changeset 11874:3b1c4562953d jdk-9+135

Merge
author lana
date Fri, 02 Sep 2016 02:41:12 +0000
parents d785dfdb7bcc (current diff) c1471e013d89 (diff)
children a20da289f646
files src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.inline.hpp src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp src/share/vm/runtime/atomic.inline.hpp test/testlibrary/ClassFileInstaller.java test/testlibrary/RedefineClassHelper.java test/testlibrary/jdk/test/lib/AllocationHelper.java test/testlibrary/jdk/test/lib/Asserts.java test/testlibrary/jdk/test/lib/BuildHelper.java test/testlibrary/jdk/test/lib/ByteCodeLoader.java test/testlibrary/jdk/test/lib/DynamicVMOption.java test/testlibrary/jdk/test/lib/ExitCode.java test/testlibrary/jdk/test/lib/FileInstaller.java test/testlibrary/jdk/test/lib/HeapRegionUsageTool.java test/testlibrary/jdk/test/lib/InMemoryJavaCompiler.java test/testlibrary/jdk/test/lib/InfiniteLoop.java test/testlibrary/jdk/test/lib/InputArguments.java test/testlibrary/jdk/test/lib/JDKToolFinder.java test/testlibrary/jdk/test/lib/JDKToolLauncher.java test/testlibrary/jdk/test/lib/OutputAnalyzer.java test/testlibrary/jdk/test/lib/OutputBuffer.java test/testlibrary/jdk/test/lib/Pair.java test/testlibrary/jdk/test/lib/Platform.java test/testlibrary/jdk/test/lib/ProcessTools.java test/testlibrary/jdk/test/lib/StreamPumper.java test/testlibrary/jdk/test/lib/TimeLimitedRunner.java test/testlibrary/jdk/test/lib/Triple.java test/testlibrary/jdk/test/lib/Utils.java test/testlibrary/jdk/test/lib/cli/CPUSpecificCommandLineOptionTest.java test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java test/testlibrary/jdk/test/lib/cli/predicate/AndPredicate.java test/testlibrary/jdk/test/lib/cli/predicate/CPUSpecificPredicate.java test/testlibrary/jdk/test/lib/cli/predicate/NotPredicate.java test/testlibrary/jdk/test/lib/cli/predicate/OrPredicate.java test/testlibrary/jdk/test/lib/dcmd/CommandExecutor.java test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java test/testlibrary/jdk/test/lib/dcmd/FileJcmdExecutor.java test/testlibrary/jdk/test/lib/dcmd/JMXExecutor.java test/testlibrary/jdk/test/lib/dcmd/JcmdExecutor.java test/testlibrary/jdk/test/lib/dcmd/MainClassJcmdExecutor.java test/testlibrary/jdk/test/lib/dcmd/PidJcmdExecutor.java test/testlibrary/jdk/test/lib/dtrace/DtraceResultsAnalyzer.java test/testlibrary/jdk/test/lib/dtrace/DtraceRunner.java
diffstat 1225 files changed, 10219 insertions(+), 12720 deletions(-) [+]
line wrap: on
line diff
--- a/make/test/JtregNative.gmk	Thu Sep 01 23:20:10 2016 +0000
+++ b/make/test/JtregNative.gmk	Fri Sep 02 02:41:12 2016 +0000
@@ -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
 
--- a/src/cpu/aarch64/vm/aarch64.ad	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/aarch64.ad	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/cpu/aarch64/vm/frame_aarch64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/frame_aarch64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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];
+}
--- a/src/cpu/aarch64/vm/interp_masm_aarch64.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/interp_masm_aarch64.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -201,7 +201,7 @@
 // #endif
     MacroAssembler::null_check(reg, offset);
 // #ifdef ASSERT
-//     reset_last_Java_frame(true, false);
+//     reset_last_Java_frame(true);
 // #endif
   }
 
--- a/src/cpu/aarch64/vm/javaFrameAnchor_aarch64.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/javaFrameAnchor_aarch64.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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; }
 
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
 
--- a/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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()));
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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()
--- a/src/cpu/aarch64/vm/vm_version_aarch64.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/aarch64/vm/vm_version_aarch64.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/cpu/sparc/vm/templateTable_sparc.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/sparc/vm/templateTable_sparc.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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() {
--- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/cpu/x86/vm/frame_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/frame_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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];
+}
--- a/src/cpu/x86/vm/frame_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/frame_x86.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/cpu/x86/vm/javaFrameAnchor_x86.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/javaFrameAnchor_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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; }
 
--- a/src/cpu/x86/vm/macroAssembler_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/macroAssembler_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
 
 }
 
--- a/src/cpu/x86/vm/macroAssembler_x86.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/macroAssembler_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/cpu/x86/vm/runtime_x86_32.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/runtime_x86_32.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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));
--- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
 
--- a/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
 
--- a/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
 
--- a/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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));
--- a/src/cpu/x86/vm/templateTable_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/templateTable_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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() {
--- a/src/cpu/x86/vm/x86_64.ad	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/x86/vm/x86_64.ad	Fri Sep 02 02:41:12 2016 +0000
@@ -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
              );
--- a/src/cpu/zero/vm/cppInterpreter_zero.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 */
--- a/src/os/aix/vm/attachListener_aix.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/aix/vm/attachListener_aix.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/os/aix/vm/os_aix.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/aix/vm/os_aix.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/os/bsd/vm/attachListener_bsd.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/bsd/vm/attachListener_bsd.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/os/bsd/vm/os_bsd.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/bsd/vm/os_bsd.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/os/linux/vm/attachListener_linux.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/linux/vm/attachListener_linux.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/os/linux/vm/os_linux.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/linux/vm/os_linux.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/os/solaris/vm/attachListener_solaris.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/solaris/vm/attachListener_solaris.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/os/solaris/vm/os_solaris.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/solaris/vm/os_solaris.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/os/windows/vm/os_windows.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/windows/vm/os_windows.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/os/windows/vm/threadCritical_windows.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os/windows/vm/threadCritical_windows.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,479 @@
+/*
+ * 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.
+ *
+ * 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_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"
+#endif
+
+// 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    (jlong    store_value, jlong*    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    (jlong    store_value, volatile jlong*    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; }
+
+inline jlong Atomic::load(volatile jlong* src) { return *src; }
+
+//
+//   machine barrier instructions:
+//
+//   - ppc_sync            two-way memory barrier, aka fence
+//   - ppc_lwsync          orders  Store|Store,
+//                                  Load|Store,
+//                                  Load|Load,
+//                         but not Store|Load
+//   - ppc_eieio           orders memory accesses for device memory (only)
+//   - ppc_isync           invalidates speculatively executed instructions
+//                         From the POWER ISA 2.06 documentation:
+//                          "[...] an isync instruction prevents the execution of
+//                         instructions following the isync until instructions
+//                         preceding the isync have completed, [...]"
+//                         From IBM's AIX assembler reference:
+//                          "The isync [...] instructions causes the processor to
+//                         refetch any instructions that might have been fetched
+//                         prior to the isync instruction. The instruction isync
+//                         causes the processor to wait for all previous instructions
+//                         to complete. Then any instructions already fetched are
+//                         discarded and instruction processing continues in the
+//                         environment established by the previous instructions."
+//
+//   semantic barrier instructions:
+//   (as defined in orderAccess.hpp)
+//
+//   - ppc_release         orders Store|Store,       (maps to ppc_lwsync)
+//                                 Load|Store
+//   - ppc_acquire         orders  Load|Store,       (maps to ppc_lwsync)
+//                                 Load|Load
+//   - ppc_fence           orders Store|Store,       (maps to ppc_sync)
+//                                 Load|Store,
+//                                 Load|Load,
+//                                Store|Load
+//
+
+#define strasm_sync                       "\n  sync    \n"
+#define strasm_lwsync                     "\n  lwsync  \n"
+#define strasm_isync                      "\n  isync   \n"
+#define strasm_release                    strasm_lwsync
+#define strasm_acquire                    strasm_lwsync
+#define strasm_fence                      strasm_sync
+#define strasm_nobarrier                  ""
+#define strasm_nobarrier_clobber_memory   ""
+
+inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
+
+  unsigned int result;
+
+  __asm__ __volatile__ (
+    strasm_lwsync
+    "1: lwarx   %0,  0, %2    \n"
+    "   add     %0, %0, %1    \n"
+    "   stwcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_isync
+    : /*%0*/"=&r" (result)
+    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
+    : "cc", "memory" );
+
+  return (jint) result;
+}
+
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+
+  long result;
+
+  __asm__ __volatile__ (
+    strasm_lwsync
+    "1: ldarx   %0,  0, %2    \n"
+    "   add     %0, %0, %1    \n"
+    "   stdcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_isync
+    : /*%0*/"=&r" (result)
+    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
+    : "cc", "memory" );
+
+  return (intptr_t) result;
+}
+
+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    (volatile jint*     dest) {
+
+  unsigned int temp;
+
+  __asm__ __volatile__ (
+    strasm_nobarrier
+    "1: lwarx   %0,  0, %2    \n"
+    "   addic   %0, %0,  1    \n"
+    "   stwcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_nobarrier
+    : /*%0*/"=&r" (temp), "=m" (*dest)
+    : /*%2*/"r" (dest), "m" (*dest)
+    : "cc" strasm_nobarrier_clobber_memory);
+
+}
+
+inline void Atomic::inc_ptr(volatile intptr_t* dest) {
+
+  long temp;
+
+  __asm__ __volatile__ (
+    strasm_nobarrier
+    "1: ldarx   %0,  0, %2    \n"
+    "   addic   %0, %0,  1    \n"
+    "   stdcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_nobarrier
+    : /*%0*/"=&r" (temp), "=m" (*dest)
+    : /*%2*/"r" (dest), "m" (*dest)
+    : "cc" strasm_nobarrier_clobber_memory);
+
+}
+
+inline void Atomic::inc_ptr(volatile void*     dest) {
+  inc_ptr((volatile intptr_t*)dest);
+}
+
+
+inline void Atomic::dec    (volatile jint*     dest) {
+
+  unsigned int temp;
+
+  __asm__ __volatile__ (
+    strasm_nobarrier
+    "1: lwarx   %0,  0, %2    \n"
+    "   addic   %0, %0, -1    \n"
+    "   stwcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_nobarrier
+    : /*%0*/"=&r" (temp), "=m" (*dest)
+    : /*%2*/"r" (dest), "m" (*dest)
+    : "cc" strasm_nobarrier_clobber_memory);
+
+}
+
+inline void Atomic::dec_ptr(volatile intptr_t* dest) {
+
+  long temp;
+
+  __asm__ __volatile__ (
+    strasm_nobarrier
+    "1: ldarx   %0,  0, %2    \n"
+    "   addic   %0, %0, -1    \n"
+    "   stdcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_nobarrier
+    : /*%0*/"=&r" (temp), "=m" (*dest)
+    : /*%2*/"r" (dest), "m" (*dest)
+    : "cc" strasm_nobarrier_clobber_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) {
+
+  // Note that xchg_ptr doesn't necessarily do an acquire
+  // (see synchronizer.cpp).
+
+  unsigned int old_value;
+  const uint64_t zero = 0;
+
+  __asm__ __volatile__ (
+    /* lwsync */
+    strasm_lwsync
+    /* atomic loop */
+    "1:                                                 \n"
+    "   lwarx   %[old_value], %[dest], %[zero]          \n"
+    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
+    "   bne-    1b                                      \n"
+    /* isync */
+    strasm_sync
+    /* exit */
+    "2:                                                 \n"
+    /* out */
+    : [old_value]       "=&r"   (old_value),
+                        "=m"    (*dest)
+    /* in */
+    : [dest]            "b"     (dest),
+      [zero]            "r"     (zero),
+      [exchange_value]  "r"     (exchange_value),
+                        "m"     (*dest)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  return (jint) old_value;
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
+
+  // Note that xchg_ptr doesn't necessarily do an acquire
+  // (see synchronizer.cpp).
+
+  long old_value;
+  const uint64_t zero = 0;
+
+  __asm__ __volatile__ (
+    /* lwsync */
+    strasm_lwsync
+    /* atomic loop */
+    "1:                                                 \n"
+    "   ldarx   %[old_value], %[dest], %[zero]          \n"
+    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
+    "   bne-    1b                                      \n"
+    /* isync */
+    strasm_sync
+    /* exit */
+    "2:                                                 \n"
+    /* out */
+    : [old_value]       "=&r"   (old_value),
+                        "=m"    (*dest)
+    /* in */
+    : [dest]            "b"     (dest),
+      [zero]            "r"     (zero),
+      [exchange_value]  "r"     (exchange_value),
+                        "m"     (*dest)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  return (intptr_t) old_value;
+}
+
+inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
+  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
+}
+
+inline void cmpxchg_pre_membar(cmpxchg_memory_order order) {
+  if (order != memory_order_relaxed) {
+    __asm__ __volatile__ (
+      /* fence */
+      strasm_sync
+      );
+  }
+}
+
+inline void cmpxchg_post_membar(cmpxchg_memory_order order) {
+  if (order != memory_order_relaxed) {
+    __asm__ __volatile__ (
+      /* fence */
+      strasm_sync
+      );
+  }
+}
+
+#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
+inline jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, cmpxchg_memory_order order) {
+
+  // Note that cmpxchg guarantees a two-way memory barrier across
+  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
+  // specified otherwise (see atomic.hpp).
+
+  // Using 32 bit internally.
+  volatile int *dest_base = (volatile int*)((uintptr_t)dest & ~3);
+
+#ifdef VM_LITTLE_ENDIAN
+  const unsigned int shift_amount        = ((uintptr_t)dest & 3) * 8;
+#else
+  const unsigned int shift_amount        = ((~(uintptr_t)dest) & 3) * 8;
+#endif
+  const unsigned int masked_compare_val  = ((unsigned int)(unsigned char)compare_value),
+                     masked_exchange_val = ((unsigned int)(unsigned char)exchange_value),
+                     xor_value           = (masked_compare_val ^ masked_exchange_val) << shift_amount;
+
+  unsigned int old_value, value32;
+
+  cmpxchg_pre_membar(order);
+
+  __asm__ __volatile__ (
+    /* simple guard */
+    "   lbz     %[old_value], 0(%[dest])                  \n"
+    "   cmpw    %[masked_compare_val], %[old_value]       \n"
+    "   bne-    2f                                        \n"
+    /* atomic loop */
+    "1:                                                   \n"
+    "   lwarx   %[value32], 0, %[dest_base]               \n"
+    /* extract byte and compare */
+    "   srd     %[old_value], %[value32], %[shift_amount] \n"
+    "   clrldi  %[old_value], %[old_value], 56            \n"
+    "   cmpw    %[masked_compare_val], %[old_value]       \n"
+    "   bne-    2f                                        \n"
+    /* replace byte and try to store */
+    "   xor     %[value32], %[xor_value], %[value32]      \n"
+    "   stwcx.  %[value32], 0, %[dest_base]               \n"
+    "   bne-    1b                                        \n"
+    /* exit */
+    "2:                                                   \n"
+    /* out */
+    : [old_value]           "=&r"   (old_value),
+      [value32]             "=&r"   (value32),
+                            "=m"    (*dest),
+                            "=m"    (*dest_base)
+    /* in */
+    : [dest]                "b"     (dest),
+      [dest_base]           "b"     (dest_base),
+      [shift_amount]        "r"     (shift_amount),
+      [masked_compare_val]  "r"     (masked_compare_val),
+      [xor_value]           "r"     (xor_value),
+                            "m"     (*dest),
+                            "m"     (*dest_base)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  cmpxchg_post_membar(order);
+
+  return (jbyte)(unsigned char)old_value;
+}
+
+inline jint Atomic::cmpxchg(jint exchange_value, volatile jint* dest, jint compare_value, cmpxchg_memory_order order) {
+
+  // Note that cmpxchg guarantees a two-way memory barrier across
+  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
+  // specified otherwise (see atomic.hpp).
+
+  unsigned int old_value;
+  const uint64_t zero = 0;
+
+  cmpxchg_pre_membar(order);
+
+  __asm__ __volatile__ (
+    /* simple guard */
+    "   lwz     %[old_value], 0(%[dest])                \n"
+    "   cmpw    %[compare_value], %[old_value]          \n"
+    "   bne-    2f                                      \n"
+    /* atomic loop */
+    "1:                                                 \n"
+    "   lwarx   %[old_value], %[dest], %[zero]          \n"
+    "   cmpw    %[compare_value], %[old_value]          \n"
+    "   bne-    2f                                      \n"
+    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
+    "   bne-    1b                                      \n"
+    /* exit */
+    "2:                                                 \n"
+    /* out */
+    : [old_value]       "=&r"   (old_value),
+                        "=m"    (*dest)
+    /* in */
+    : [dest]            "b"     (dest),
+      [zero]            "r"     (zero),
+      [compare_value]   "r"     (compare_value),
+      [exchange_value]  "r"     (exchange_value),
+                        "m"     (*dest)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  cmpxchg_post_membar(order);
+
+  return (jint) old_value;
+}
+
+inline jlong Atomic::cmpxchg(jlong exchange_value, volatile jlong* dest, jlong compare_value, cmpxchg_memory_order order) {
+
+  // Note that cmpxchg guarantees a two-way memory barrier across
+  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
+  // specified otherwise (see atomic.hpp).
+
+  long old_value;
+  const uint64_t zero = 0;
+
+  cmpxchg_pre_membar(order);
+
+  __asm__ __volatile__ (
+    /* simple guard */
+    "   ld      %[old_value], 0(%[dest])                \n"
+    "   cmpd    %[compare_value], %[old_value]          \n"
+    "   bne-    2f                                      \n"
+    /* atomic loop */
+    "1:                                                 \n"
+    "   ldarx   %[old_value], %[dest], %[zero]          \n"
+    "   cmpd    %[compare_value], %[old_value]          \n"
+    "   bne-    2f                                      \n"
+    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
+    "   bne-    1b                                      \n"
+    /* exit */
+    "2:                                                 \n"
+    /* out */
+    : [old_value]       "=&r"   (old_value),
+                        "=m"    (*dest)
+    /* in */
+    : [dest]            "b"     (dest),
+      [zero]            "r"     (zero),
+      [compare_value]   "r"     (compare_value),
+      [exchange_value]  "r"     (exchange_value),
+                        "m"     (*dest)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  cmpxchg_post_membar(order);
+
+  return (jlong) old_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);
+}
+
+#undef strasm_sync
+#undef strasm_lwsync
+#undef strasm_isync
+#undef strasm_release
+#undef strasm_acquire
+#undef strasm_fence
+#undef strasm_nobarrier
+#undef strasm_nobarrier_clobber_memory
+
+#endif // OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP
--- a/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,482 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, 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.
- *
- * 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_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 _LP64
-#error "Atomic currently only impleneted for PPC64"
-#endif
-
-// 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    (jlong    store_value, jlong*    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    (jlong    store_value, volatile jlong*    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; }
-
-inline jlong Atomic::load(volatile jlong* src) { return *src; }
-
-//
-//   machine barrier instructions:
-//
-//   - ppc_sync            two-way memory barrier, aka fence
-//   - ppc_lwsync          orders  Store|Store,
-//                                  Load|Store,
-//                                  Load|Load,
-//                         but not Store|Load
-//   - ppc_eieio           orders memory accesses for device memory (only)
-//   - ppc_isync           invalidates speculatively executed instructions
-//                         From the POWER ISA 2.06 documentation:
-//                          "[...] an isync instruction prevents the execution of
-//                         instructions following the isync until instructions
-//                         preceding the isync have completed, [...]"
-//                         From IBM's AIX assembler reference:
-//                          "The isync [...] instructions causes the processor to
-//                         refetch any instructions that might have been fetched
-//                         prior to the isync instruction. The instruction isync
-//                         causes the processor to wait for all previous instructions
-//                         to complete. Then any instructions already fetched are
-//                         discarded and instruction processing continues in the
-//                         environment established by the previous instructions."
-//
-//   semantic barrier instructions:
-//   (as defined in orderAccess.hpp)
-//
-//   - ppc_release         orders Store|Store,       (maps to ppc_lwsync)
-//                                 Load|Store
-//   - ppc_acquire         orders  Load|Store,       (maps to ppc_lwsync)
-//                                 Load|Load
-//   - ppc_fence           orders Store|Store,       (maps to ppc_sync)
-//                                 Load|Store,
-//                                 Load|Load,
-//                                Store|Load
-//
-
-#define strasm_sync                       "\n  sync    \n"
-#define strasm_lwsync                     "\n  lwsync  \n"
-#define strasm_isync                      "\n  isync   \n"
-#define strasm_release                    strasm_lwsync
-#define strasm_acquire                    strasm_lwsync
-#define strasm_fence                      strasm_sync
-#define strasm_nobarrier                  ""
-#define strasm_nobarrier_clobber_memory   ""
-
-inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
-
-  unsigned int result;
-
-  __asm__ __volatile__ (
-    strasm_lwsync
-    "1: lwarx   %0,  0, %2    \n"
-    "   add     %0, %0, %1    \n"
-    "   stwcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_isync
-    : /*%0*/"=&r" (result)
-    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
-    : "cc", "memory" );
-
-  return (jint) result;
-}
-
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-
-  long result;
-
-  __asm__ __volatile__ (
-    strasm_lwsync
-    "1: ldarx   %0,  0, %2    \n"
-    "   add     %0, %0, %1    \n"
-    "   stdcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_isync
-    : /*%0*/"=&r" (result)
-    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
-    : "cc", "memory" );
-
-  return (intptr_t) result;
-}
-
-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    (volatile jint*     dest) {
-
-  unsigned int temp;
-
-  __asm__ __volatile__ (
-    strasm_nobarrier
-    "1: lwarx   %0,  0, %2    \n"
-    "   addic   %0, %0,  1    \n"
-    "   stwcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_nobarrier
-    : /*%0*/"=&r" (temp), "=m" (*dest)
-    : /*%2*/"r" (dest), "m" (*dest)
-    : "cc" strasm_nobarrier_clobber_memory);
-
-}
-
-inline void Atomic::inc_ptr(volatile intptr_t* dest) {
-
-  long temp;
-
-  __asm__ __volatile__ (
-    strasm_nobarrier
-    "1: ldarx   %0,  0, %2    \n"
-    "   addic   %0, %0,  1    \n"
-    "   stdcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_nobarrier
-    : /*%0*/"=&r" (temp), "=m" (*dest)
-    : /*%2*/"r" (dest), "m" (*dest)
-    : "cc" strasm_nobarrier_clobber_memory);
-
-}
-
-inline void Atomic::inc_ptr(volatile void*     dest) {
-  inc_ptr((volatile intptr_t*)dest);
-}
-
-
-inline void Atomic::dec    (volatile jint*     dest) {
-
-  unsigned int temp;
-
-  __asm__ __volatile__ (
-    strasm_nobarrier
-    "1: lwarx   %0,  0, %2    \n"
-    "   addic   %0, %0, -1    \n"
-    "   stwcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_nobarrier
-    : /*%0*/"=&r" (temp), "=m" (*dest)
-    : /*%2*/"r" (dest), "m" (*dest)
-    : "cc" strasm_nobarrier_clobber_memory);
-
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest) {
-
-  long temp;
-
-  __asm__ __volatile__ (
-    strasm_nobarrier
-    "1: ldarx   %0,  0, %2    \n"
-    "   addic   %0, %0, -1    \n"
-    "   stdcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_nobarrier
-    : /*%0*/"=&r" (temp), "=m" (*dest)
-    : /*%2*/"r" (dest), "m" (*dest)
-    : "cc" strasm_nobarrier_clobber_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) {
-
-  // Note that xchg_ptr doesn't necessarily do an acquire
-  // (see synchronizer.cpp).
-
-  unsigned int old_value;
-  const uint64_t zero = 0;
-
-  __asm__ __volatile__ (
-    /* lwsync */
-    strasm_lwsync
-    /* atomic loop */
-    "1:                                                 \n"
-    "   lwarx   %[old_value], %[dest], %[zero]          \n"
-    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
-    "   bne-    1b                                      \n"
-    /* isync */
-    strasm_sync
-    /* exit */
-    "2:                                                 \n"
-    /* out */
-    : [old_value]       "=&r"   (old_value),
-                        "=m"    (*dest)
-    /* in */
-    : [dest]            "b"     (dest),
-      [zero]            "r"     (zero),
-      [exchange_value]  "r"     (exchange_value),
-                        "m"     (*dest)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  return (jint) old_value;
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-
-  // Note that xchg_ptr doesn't necessarily do an acquire
-  // (see synchronizer.cpp).
-
-  long old_value;
-  const uint64_t zero = 0;
-
-  __asm__ __volatile__ (
-    /* lwsync */
-    strasm_lwsync
-    /* atomic loop */
-    "1:                                                 \n"
-    "   ldarx   %[old_value], %[dest], %[zero]          \n"
-    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
-    "   bne-    1b                                      \n"
-    /* isync */
-    strasm_sync
-    /* exit */
-    "2:                                                 \n"
-    /* out */
-    : [old_value]       "=&r"   (old_value),
-                        "=m"    (*dest)
-    /* in */
-    : [dest]            "b"     (dest),
-      [zero]            "r"     (zero),
-      [exchange_value]  "r"     (exchange_value),
-                        "m"     (*dest)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  return (intptr_t) old_value;
-}
-
-inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
-  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
-}
-
-inline void cmpxchg_pre_membar(cmpxchg_memory_order order) {
-  if (order != memory_order_relaxed) {
-    __asm__ __volatile__ (
-      /* fence */
-      strasm_sync
-      );
-  }
-}
-
-inline void cmpxchg_post_membar(cmpxchg_memory_order order) {
-  if (order != memory_order_relaxed) {
-    __asm__ __volatile__ (
-      /* fence */
-      strasm_sync
-      );
-  }
-}
-
-#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-inline jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, cmpxchg_memory_order order) {
-
-  // Note that cmpxchg guarantees a two-way memory barrier across
-  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
-  // specified otherwise (see atomic.hpp).
-
-  // Using 32 bit internally.
-  volatile int *dest_base = (volatile int*)((uintptr_t)dest & ~3);
-
-#ifdef VM_LITTLE_ENDIAN
-  const unsigned int shift_amount        = ((uintptr_t)dest & 3) * 8;
-#else
-  const unsigned int shift_amount        = ((~(uintptr_t)dest) & 3) * 8;
-#endif
-  const unsigned int masked_compare_val  = ((unsigned int)(unsigned char)compare_value),
-                     masked_exchange_val = ((unsigned int)(unsigned char)exchange_value),
-                     xor_value           = (masked_compare_val ^ masked_exchange_val) << shift_amount;
-
-  unsigned int old_value, value32;
-
-  cmpxchg_pre_membar(order);
-
-  __asm__ __volatile__ (
-    /* simple guard */
-    "   lbz     %[old_value], 0(%[dest])                  \n"
-    "   cmpw    %[masked_compare_val], %[old_value]       \n"
-    "   bne-    2f                                        \n"
-    /* atomic loop */
-    "1:                                                   \n"
-    "   lwarx   %[value32], 0, %[dest_base]               \n"
-    /* extract byte and compare */
-    "   srd     %[old_value], %[value32], %[shift_amount] \n"
-    "   clrldi  %[old_value], %[old_value], 56            \n"
-    "   cmpw    %[masked_compare_val], %[old_value]       \n"
-    "   bne-    2f                                        \n"
-    /* replace byte and try to store */
-    "   xor     %[value32], %[xor_value], %[value32]      \n"
-    "   stwcx.  %[value32], 0, %[dest_base]               \n"
-    "   bne-    1b                                        \n"
-    /* exit */
-    "2:                                                   \n"
-    /* out */
-    : [old_value]           "=&r"   (old_value),
-      [value32]             "=&r"   (value32),
-                            "=m"    (*dest),
-                            "=m"    (*dest_base)
-    /* in */
-    : [dest]                "b"     (dest),
-      [dest_base]           "b"     (dest_base),
-      [shift_amount]        "r"     (shift_amount),
-      [masked_compare_val]  "r"     (masked_compare_val),
-      [xor_value]           "r"     (xor_value),
-                            "m"     (*dest),
-                            "m"     (*dest_base)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  cmpxchg_post_membar(order);
-
-  return (jbyte)(unsigned char)old_value;
-}
-
-inline jint Atomic::cmpxchg(jint exchange_value, volatile jint* dest, jint compare_value, cmpxchg_memory_order order) {
-
-  // Note that cmpxchg guarantees a two-way memory barrier across
-  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
-  // specified otherwise (see atomic.hpp).
-
-  unsigned int old_value;
-  const uint64_t zero = 0;
-
-  cmpxchg_pre_membar(order);
-
-  __asm__ __volatile__ (
-    /* simple guard */
-    "   lwz     %[old_value], 0(%[dest])                \n"
-    "   cmpw    %[compare_value], %[old_value]          \n"
-    "   bne-    2f                                      \n"
-    /* atomic loop */
-    "1:                                                 \n"
-    "   lwarx   %[old_value], %[dest], %[zero]          \n"
-    "   cmpw    %[compare_value], %[old_value]          \n"
-    "   bne-    2f                                      \n"
-    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
-    "   bne-    1b                                      \n"
-    /* exit */
-    "2:                                                 \n"
-    /* out */
-    : [old_value]       "=&r"   (old_value),
-                        "=m"    (*dest)
-    /* in */
-    : [dest]            "b"     (dest),
-      [zero]            "r"     (zero),
-      [compare_value]   "r"     (compare_value),
-      [exchange_value]  "r"     (exchange_value),
-                        "m"     (*dest)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  cmpxchg_post_membar(order);
-
-  return (jint) old_value;
-}
-
-inline jlong Atomic::cmpxchg(jlong exchange_value, volatile jlong* dest, jlong compare_value, cmpxchg_memory_order order) {
-
-  // Note that cmpxchg guarantees a two-way memory barrier across
-  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
-  // specified otherwise (see atomic.hpp).
-
-  long old_value;
-  const uint64_t zero = 0;
-
-  cmpxchg_pre_membar(order);
-
-  __asm__ __volatile__ (
-    /* simple guard */
-    "   ld      %[old_value], 0(%[dest])                \n"
-    "   cmpd    %[compare_value], %[old_value]          \n"
-    "   bne-    2f                                      \n"
-    /* atomic loop */
-    "1:                                                 \n"
-    "   ldarx   %[old_value], %[dest], %[zero]          \n"
-    "   cmpd    %[compare_value], %[old_value]          \n"
-    "   bne-    2f                                      \n"
-    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
-    "   bne-    1b                                      \n"
-    /* exit */
-    "2:                                                 \n"
-    /* out */
-    : [old_value]       "=&r"   (old_value),
-                        "=m"    (*dest)
-    /* in */
-    : [dest]            "b"     (dest),
-      [zero]            "r"     (zero),
-      [compare_value]   "r"     (compare_value),
-      [exchange_value]  "r"     (exchange_value),
-                        "m"     (*dest)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  cmpxchg_post_membar(order);
-
-  return (jlong) old_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);
-}
-
-#undef strasm_sync
-#undef strasm_lwsync
-#undef strasm_isync
-#undef strasm_release
-#undef strasm_acquire
-#undef strasm_fence
-#undef strasm_nobarrier
-#undef strasm_nobarrier_clobber_memory
-
-#endif // OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,227 @@
+/*
+ * 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
+ * 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_BSD_X86_VM_ATOMIC_BSD_X86_HPP
+#define OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_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 bsd_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_BSD_X86_VM_ATOMIC_BSD_X86_HPP
--- a/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
-#define OS_CPU_BSD_X86_VM_ATOMIC_BSD_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 bsd_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_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
--- a/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/os_cpu/bsd_x86/vm/thread_bsd_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/bsd_x86/vm/thread_bsd_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
   }
--- a/src/os_cpu/bsd_x86/vm/thread_bsd_x86.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/bsd_x86/vm/thread_bsd_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,333 @@
+/*
+ * 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.
+ *
+ * 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_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP
+#define OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP
+
+#include "runtime/os.hpp"
+
+// Implementation of class atomic
+
+#ifdef M68K
+
+/*
+ * __m68k_cmpxchg
+ *
+ * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
+ * Returns newval on success and oldval if no exchange happened.
+ * This implementation is processor specific and works on
+ * 68020 68030 68040 and 68060.
+ *
+ * It will not work on ColdFire, 68000 and 68010 since they lack the CAS
+ * instruction.
+ * Using a kernelhelper would be better for arch complete implementation.
+ *
+ */
+
+static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) {
+  int ret;
+  __asm __volatile ("cas%.l %0,%2,%1"
+                   : "=d" (ret), "+m" (*(ptr))
+                   : "d" (newval), "0" (oldval));
+  return ret;
+}
+
+/* Perform an atomic compare and swap: if the current value of `*PTR'
+   is OLDVAL, then write NEWVAL into `*PTR'.  Return the contents of
+   `*PTR' before the operation.*/
+static inline int m68k_compare_and_swap(volatile int *ptr,
+                                        int oldval,
+                                        int newval) {
+  for (;;) {
+      int prev = *ptr;
+      if (prev != oldval)
+        return prev;
+
+      if (__m68k_cmpxchg (prev, newval, ptr) == newval)
+        // Success.
+        return prev;
+
+      // We failed even though prev == oldval.  Try again.
+    }
+}
+
+/* Atomically add an int to memory.  */
+static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) {
+  for (;;) {
+      // Loop until success.
+
+      int prev = *ptr;
+
+      if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value)
+        return prev + add_value;
+    }
+}
+
+/* Atomically write VALUE into `*PTR' and returns the previous
+   contents of `*PTR'.  */
+static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) {
+  for (;;) {
+      // Loop until success.
+      int prev = *ptr;
+
+      if (__m68k_cmpxchg (prev, newval, ptr) == prev)
+        return prev;
+    }
+}
+#endif // M68K
+
+#ifdef ARM
+
+/*
+ * __kernel_cmpxchg
+ *
+ * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
+ * Return zero if *ptr was changed or non-zero if no exchange happened.
+ * The C flag is also set if *ptr was changed to allow for assembly
+ * optimization in the calling code.
+ *
+ */
+
+typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
+#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0)
+
+
+
+/* Perform an atomic compare and swap: if the current value of `*PTR'
+   is OLDVAL, then write NEWVAL into `*PTR'.  Return the contents of
+   `*PTR' before the operation.*/
+static inline int arm_compare_and_swap(volatile int *ptr,
+                                       int oldval,
+                                       int newval) {
+  for (;;) {
+      int prev = *ptr;
+      if (prev != oldval)
+        return prev;
+
+      if (__kernel_cmpxchg (prev, newval, ptr) == 0)
+        // Success.
+        return prev;
+
+      // We failed even though prev == oldval.  Try again.
+    }
+}
+
+/* Atomically add an int to memory.  */
+static inline int arm_add_and_fetch(volatile int *ptr, int add_value) {
+  for (;;) {
+      // Loop until a __kernel_cmpxchg succeeds.
+
+      int prev = *ptr;
+
+      if (__kernel_cmpxchg (prev, prev + add_value, ptr) == 0)
+        return prev + add_value;
+    }
+}
+
+/* Atomically write VALUE into `*PTR' and returns the previous
+   contents of `*PTR'.  */
+static inline int arm_lock_test_and_set(volatile int *ptr, int newval) {
+  for (;;) {
+      // Loop until a __kernel_cmpxchg succeeds.
+      int prev = *ptr;
+
+      if (__kernel_cmpxchg (prev, newval, ptr) == 0)
+        return prev;
+    }
+}
+#endif // ARM
+
+inline void Atomic::store(jint store_value, volatile jint* dest) {
+#if !defined(ARM) && !defined(M68K)
+  __sync_synchronize();
+#endif
+  *dest = store_value;
+}
+
+inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) {
+#if !defined(ARM) && !defined(M68K)
+  __sync_synchronize();
+#endif
+  *dest = store_value;
+}
+
+inline jint Atomic::add(jint add_value, volatile jint* dest) {
+#ifdef ARM
+  return arm_add_and_fetch(dest, add_value);
+#else
+#ifdef M68K
+  return m68k_add_and_fetch(dest, add_value);
+#else
+  return __sync_add_and_fetch(dest, add_value);
+#endif // M68K
+#endif // ARM
+}
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+#ifdef ARM
+  return arm_add_and_fetch(dest, add_value);
+#else
+#ifdef M68K
+  return m68k_add_and_fetch(dest, add_value);
+#else
+  return __sync_add_and_fetch(dest, add_value);
+#endif // M68K
+#endif // ARM
+}
+
+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(volatile jint* dest) {
+  add(1, dest);
+}
+
+inline void Atomic::inc_ptr(volatile intptr_t* dest) {
+  add_ptr(1, dest);
+}
+
+inline void Atomic::inc_ptr(volatile void* dest) {
+  add_ptr(1, dest);
+}
+
+inline void Atomic::dec(volatile jint* dest) {
+  add(-1, dest);
+}
+
+inline void Atomic::dec_ptr(volatile intptr_t* dest) {
+  add_ptr(-1, dest);
+}
+
+inline void Atomic::dec_ptr(volatile void* dest) {
+  add_ptr(-1, dest);
+}
+
+inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
+#ifdef ARM
+  return arm_lock_test_and_set(dest, exchange_value);
+#else
+#ifdef M68K
+  return m68k_lock_test_and_set(dest, exchange_value);
+#else
+  // __sync_lock_test_and_set is a bizarrely named atomic exchange
+  // operation.  Note that some platforms only support this with the
+  // limitation that the only valid value to store is the immediate
+  // constant 1.  There is a test for this in JNI_CreateJavaVM().
+  jint result = __sync_lock_test_and_set (dest, exchange_value);
+  // All atomic operations are expected to be full memory barriers
+  // (see atomic.hpp). However, __sync_lock_test_and_set is not
+  // a full memory barrier, but an acquire barrier. Hence, this added
+  // barrier.
+  __sync_synchronize();
+  return result;
+#endif // M68K
+#endif // ARM
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
+                                 volatile intptr_t* dest) {
+#ifdef ARM
+  return arm_lock_test_and_set(dest, exchange_value);
+#else
+#ifdef M68K
+  return m68k_lock_test_and_set(dest, exchange_value);
+#else
+  intptr_t result = __sync_lock_test_and_set (dest, exchange_value);
+  __sync_synchronize();
+  return result;
+#endif // M68K
+#endif // ARM
+}
+
+inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
+  return (void *) xchg_ptr((intptr_t) exchange_value,
+                           (volatile intptr_t*) dest);
+}
+
+inline jint Atomic::cmpxchg(jint exchange_value,
+                            volatile jint* dest,
+                            jint compare_value,
+                            cmpxchg_memory_order order) {
+#ifdef ARM
+  return arm_compare_and_swap(dest, compare_value, exchange_value);
+#else
+#ifdef M68K
+  return m68k_compare_and_swap(dest, compare_value, exchange_value);
+#else
+  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
+#endif // M68K
+#endif // ARM
+}
+
+inline jlong Atomic::cmpxchg(jlong exchange_value,
+                             volatile jlong* dest,
+                             jlong compare_value,
+                             cmpxchg_memory_order order) {
+
+  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
+}
+
+inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value,
+                                    volatile intptr_t* dest,
+                                    intptr_t compare_value,
+                                    cmpxchg_memory_order order) {
+#ifdef ARM
+  return arm_compare_and_swap(dest, compare_value, exchange_value);
+#else
+#ifdef M68K
+  return m68k_compare_and_swap(dest, compare_value, exchange_value);
+#else
+  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
+#endif // M68K
+#endif // ARM
+}
+
+inline void* Atomic::cmpxchg_ptr(void* exchange_value,
+                                 volatile void* dest,
+                                 void* compare_value,
+                                 cmpxchg_memory_order order) {
+
+  return (void *) cmpxchg_ptr((intptr_t) exchange_value,
+                              (volatile intptr_t*) dest,
+                              (intptr_t) compare_value,
+                              order);
+}
+
+inline jlong Atomic::load(volatile jlong* src) {
+  volatile jlong dest;
+  os::atomic_copy64(src, &dest);
+  return dest;
+}
+
+inline void Atomic::store(jlong store_value, jlong* dest) {
+  os::atomic_copy64((volatile jlong*)&store_value, (volatile jlong*)dest);
+}
+
+inline void Atomic::store(jlong store_value, volatile jlong* dest) {
+  os::atomic_copy64((volatile jlong*)&store_value, dest);
+}
+
+#endif // OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP
--- a/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 2003, 2014, 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.
- *
- * 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_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
-#define OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
-
-// Implementation of class atomic
-
-#ifdef M68K
-
-/*
- * __m68k_cmpxchg
- *
- * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
- * Returns newval on success and oldval if no exchange happened.
- * This implementation is processor specific and works on
- * 68020 68030 68040 and 68060.
- *
- * It will not work on ColdFire, 68000 and 68010 since they lack the CAS
- * instruction.
- * Using a kernelhelper would be better for arch complete implementation.
- *
- */
-
-static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) {
-  int ret;
-  __asm __volatile ("cas%.l %0,%2,%1"
-                   : "=d" (ret), "+m" (*(ptr))
-                   : "d" (newval), "0" (oldval));
-  return ret;
-}
-
-/* Perform an atomic compare and swap: if the current value of `*PTR'
-   is OLDVAL, then write NEWVAL into `*PTR'.  Return the contents of
-   `*PTR' before the operation.*/
-static inline int m68k_compare_and_swap(volatile int *ptr,
-                                        int oldval,
-                                        int newval) {
-  for (;;) {
-      int prev = *ptr;
-      if (prev != oldval)
-        return prev;
-
-      if (__m68k_cmpxchg (prev, newval, ptr) == newval)
-        // Success.
-        return prev;
-
-      // We failed even though prev == oldval.  Try again.
-    }
-}
-
-/* Atomically add an int to memory.  */
-static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) {
-  for (;;) {
-      // Loop until success.
-
-      int prev = *ptr;
-
-      if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value)
-        return prev + add_value;
-    }
-}
-
-/* Atomically write VALUE into `*PTR' and returns the previous
-   contents of `*PTR'.  */
-static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) {
-  for (;;) {
-      // Loop until success.
-      int prev = *ptr;
-
-      if (__m68k_cmpxchg (prev, newval, ptr) == prev)
-        return prev;
-    }
-}
-#endif // M68K
-
-#ifdef ARM
-
-/*
- * __kernel_cmpxchg
- *
- * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
- * Return zero if *ptr was changed or non-zero if no exchange happened.
- * The C flag is also set if *ptr was changed to allow for assembly
- * optimization in the calling code.
- *
- */
-
-typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
-#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0)
-
-
-
-/* Perform an atomic compare and swap: if the current value of `*PTR'
-   is OLDVAL, then write NEWVAL into `*PTR'.  Return the contents of
-   `*PTR' before the operation.*/
-static inline int arm_compare_and_swap(volatile int *ptr,
-                                       int oldval,
-                                       int newval) {
-  for (;;) {
-      int prev = *ptr;
-      if (prev != oldval)
-        return prev;
-
-      if (__kernel_cmpxchg (prev, newval, ptr) == 0)
-        // Success.
-        return prev;
-
-      // We failed even though prev == oldval.  Try again.
-    }
-}
-
-/* Atomically add an int to memory.  */
-static inline int arm_add_and_fetch(volatile int *ptr, int add_value) {
-  for (;;) {
-      // Loop until a __kernel_cmpxchg succeeds.
-
-      int prev = *ptr;
-
-      if (__kernel_cmpxchg (prev, prev + add_value, ptr) == 0)
-        return prev + add_value;
-    }
-}
-
-/* Atomically write VALUE into `*PTR' and returns the previous
-   contents of `*PTR'.  */
-static inline int arm_lock_test_and_set(volatile int *ptr, int newval) {
-  for (;;) {
-      // Loop until a __kernel_cmpxchg succeeds.
-      int prev = *ptr;
-
-      if (__kernel_cmpxchg (prev, newval, ptr) == 0)
-        return prev;
-    }
-}
-#endif // ARM
-
-inline void Atomic::store(jint store_value, volatile jint* dest) {
-#if !defined(ARM) && !defined(M68K)
-  __sync_synchronize();
-#endif
-  *dest = store_value;
-}
-
-inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) {
-#if !defined(ARM) && !defined(M68K)
-  __sync_synchronize();
-#endif
-  *dest = store_value;
-}
-
-inline jint Atomic::add(jint add_value, volatile jint* dest) {
-#ifdef ARM
-  return arm_add_and_fetch(dest, add_value);
-#else
-#ifdef M68K
-  return m68k_add_and_fetch(dest, add_value);
-#else
-  return __sync_add_and_fetch(dest, add_value);
-#endif // M68K
-#endif // ARM
-}
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-#ifdef ARM
-  return arm_add_and_fetch(dest, add_value);
-#else
-#ifdef M68K
-  return m68k_add_and_fetch(dest, add_value);
-#else
-  return __sync_add_and_fetch(dest, add_value);
-#endif // M68K
-#endif // ARM
-}
-
-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(volatile jint* dest) {
-  add(1, dest);
-}
-
-inline void Atomic::inc_ptr(volatile intptr_t* dest) {
-  add_ptr(1, dest);
-}
-
-inline void Atomic::inc_ptr(volatile void* dest) {
-  add_ptr(1, dest);
-}
-
-inline void Atomic::dec(volatile jint* dest) {
-  add(-1, dest);
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest) {
-  add_ptr(-1, dest);
-}
-
-inline void Atomic::dec_ptr(volatile void* dest) {
-  add_ptr(-1, dest);
-}
-
-inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
-#ifdef ARM
-  return arm_lock_test_and_set(dest, exchange_value);
-#else
-#ifdef M68K
-  return m68k_lock_test_and_set(dest, exchange_value);
-#else
-  // __sync_lock_test_and_set is a bizarrely named atomic exchange
-  // operation.  Note that some platforms only support this with the
-  // limitation that the only valid value to store is the immediate
-  // constant 1.  There is a test for this in JNI_CreateJavaVM().
-  jint result = __sync_lock_test_and_set (dest, exchange_value);
-  // All atomic operations are expected to be full memory barriers
-  // (see atomic.hpp). However, __sync_lock_test_and_set is not
-  // a full memory barrier, but an acquire barrier. Hence, this added
-  // barrier.
-  __sync_synchronize();
-  return result;
-#endif // M68K
-#endif // ARM
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
-                                 volatile intptr_t* dest) {
-#ifdef ARM
-  return arm_lock_test_and_set(dest, exchange_value);
-#else
-#ifdef M68K
-  return m68k_lock_test_and_set(dest, exchange_value);
-#else
-  intptr_t result = __sync_lock_test_and_set (dest, exchange_value);
-  __sync_synchronize();
-  return result;
-#endif // M68K
-#endif // ARM
-}
-
-inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
-  return (void *) xchg_ptr((intptr_t) exchange_value,
-                           (volatile intptr_t*) dest);
-}
-
-inline jint Atomic::cmpxchg(jint exchange_value,
-                            volatile jint* dest,
-                            jint compare_value,
-                            cmpxchg_memory_order order) {
-#ifdef ARM
-  return arm_compare_and_swap(dest, compare_value, exchange_value);
-#else
-#ifdef M68K
-  return m68k_compare_and_swap(dest, compare_value, exchange_value);
-#else
-  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-#endif // M68K
-#endif // ARM
-}
-
-inline jlong Atomic::cmpxchg(jlong exchange_value,
-                             volatile jlong* dest,
-                             jlong compare_value,
-                             cmpxchg_memory_order order) {
-
-  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-}
-
-inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value,
-                                    volatile intptr_t* dest,
-                                    intptr_t compare_value,
-                                    cmpxchg_memory_order order) {
-#ifdef ARM
-  return arm_compare_and_swap(dest, compare_value, exchange_value);
-#else
-#ifdef M68K
-  return m68k_compare_and_swap(dest, compare_value, exchange_value);
-#else
-  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-#endif // M68K
-#endif // ARM
-}
-
-inline void* Atomic::cmpxchg_ptr(void* exchange_value,
-                                 volatile void* dest,
-                                 void* compare_value,
-                                 cmpxchg_memory_order order) {
-
-  return (void *) cmpxchg_ptr((intptr_t) exchange_value,
-                              (volatile intptr_t*) dest,
-                              (intptr_t) compare_value,
-                              order);
-}
-
-inline jlong Atomic::load(volatile jlong* src) {
-  volatile jlong dest;
-  os::atomic_copy64(src, &dest);
-  return dest;
-}
-
-inline void Atomic::store(jlong store_value, jlong* dest) {
-  os::atomic_copy64((volatile jlong*)&store_value, (volatile jlong*)dest);
-}
-
-inline void Atomic::store(jlong store_value, volatile jlong* dest) {
-  os::atomic_copy64((volatile jlong*)&store_value, dest);
-}
-
-#endif // OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,162 @@
+/*
+ * 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.
+ *
+ * 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_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP
+#define OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP
+
+#include "vm_version_aarch64.hpp"
+
+// Implementation of class atomic
+
+#define FULL_MEM_BARRIER  __sync_synchronize()
+#define READ_MEM_BARRIER  __atomic_thread_fence(__ATOMIC_ACQUIRE);
+#define WRITE_MEM_BARRIER __atomic_thread_fence(__ATOMIC_RELEASE);
+
+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; }
+
+
+inline jint Atomic::add(jint add_value, volatile jint* dest)
+{
+ return __sync_add_and_fetch(dest, add_value);
+}
+
+inline void Atomic::inc(volatile jint* dest)
+{
+ add(1, dest);
+}
+
+inline void Atomic::inc_ptr(volatile void* dest)
+{
+ add_ptr(1, dest);
+}
+
+inline void Atomic::dec (volatile jint* dest)
+{
+ add(-1, dest);
+}
+
+inline void Atomic::dec_ptr(volatile void* dest)
+{
+ add_ptr(-1, dest);
+}
+
+inline jint Atomic::xchg (jint exchange_value, volatile jint* dest)
+{
+  jint res = __sync_lock_test_and_set (dest, exchange_value);
+  FULL_MEM_BARRIER;
+  return res;
+}
+
+inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest)
+{
+  return (void *) xchg_ptr((intptr_t) exchange_value,
+                           (volatile intptr_t*) dest);
+}
+
+template <typename T> T generic_cmpxchg(T exchange_value, volatile T* dest,
+                                        T compare_value, cmpxchg_memory_order order)
+{
+  if (order == memory_order_relaxed) {
+    T value = compare_value;
+    __atomic_compare_exchange(dest, &value, &exchange_value, /*weak*/false,
+                              __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+    return value;
+  } else {
+    return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
+  }
+}
+
+#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
+inline jbyte Atomic::cmpxchg (jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, cmpxchg_memory_order order)
+{
+  return generic_cmpxchg(exchange_value, dest, compare_value, order);
+}
+
+inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value, cmpxchg_memory_order order)
+{
+  return generic_cmpxchg(exchange_value, dest, compare_value, order);
+}
+
+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)
+{
+ return __sync_add_and_fetch(dest, 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)
+{
+ add_ptr(1, dest);
+}
+
+inline void Atomic::dec_ptr(volatile intptr_t* dest)
+{
+ add_ptr(-1, dest);
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest)
+{
+  intptr_t res = __sync_lock_test_and_set (dest, exchange_value);
+  FULL_MEM_BARRIER;
+  return res;
+}
+
+inline jlong Atomic::cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value, cmpxchg_memory_order order)
+{
+  return generic_cmpxchg(exchange_value, dest, compare_value, order);
+}
+
+inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, cmpxchg_memory_order order)
+{
+  return generic_cmpxchg(exchange_value, dest, compare_value, order);
+}
+
+inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value, cmpxchg_memory_order order)
+{
+  return (void *) cmpxchg_ptr((intptr_t) exchange_value,
+                              (volatile intptr_t*) dest,
+                              (intptr_t) compare_value,
+                              order);
+}
+
+inline jlong Atomic::load(volatile jlong* src) { return *src; }
+
+#endif // OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP
--- a/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 1999, 2011, 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.
- *
- * 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_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
-#define OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
-#include "vm_version_aarch64.hpp"
-
-// Implementation of class atomic
-
-#define FULL_MEM_BARRIER  __sync_synchronize()
-#define READ_MEM_BARRIER  __atomic_thread_fence(__ATOMIC_ACQUIRE);
-#define WRITE_MEM_BARRIER __atomic_thread_fence(__ATOMIC_RELEASE);
-
-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; }
-
-
-inline jint Atomic::add(jint add_value, volatile jint* dest)
-{
- return __sync_add_and_fetch(dest, add_value);
-}
-
-inline void Atomic::inc(volatile jint* dest)
-{
- add(1, dest);
-}
-
-inline void Atomic::inc_ptr(volatile void* dest)
-{
- add_ptr(1, dest);
-}
-
-inline void Atomic::dec (volatile jint* dest)
-{
- add(-1, dest);
-}
-
-inline void Atomic::dec_ptr(volatile void* dest)
-{
- add_ptr(-1, dest);
-}
-
-inline jint Atomic::xchg (jint exchange_value, volatile jint* dest)
-{
-  jint res = __sync_lock_test_and_set (dest, exchange_value);
-  FULL_MEM_BARRIER;
-  return res;
-}
-
-inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest)
-{
-  return (void *) xchg_ptr((intptr_t) exchange_value,
-                           (volatile intptr_t*) dest);
-}
-
-template <typename T> T generic_cmpxchg(T exchange_value, volatile T* dest,
-                                        T compare_value, cmpxchg_memory_order order)
-{
-  if (order == memory_order_relaxed) {
-    T value = compare_value;
-    __atomic_compare_exchange(dest, &value, &exchange_value, /*weak*/false,
-                              __ATOMIC_RELAXED, __ATOMIC_RELAXED);
-    return value;
-  } else {
-    return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-  }
-}
-
-#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-inline jbyte Atomic::cmpxchg (jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, cmpxchg_memory_order order)
-{
-  return generic_cmpxchg(exchange_value, dest, compare_value, order);
-}
-
-inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value, cmpxchg_memory_order order)
-{
-  return generic_cmpxchg(exchange_value, dest, compare_value, order);
-}
-
-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)
-{
- return __sync_add_and_fetch(dest, 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)
-{
- add_ptr(1, dest);
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest)
-{
- add_ptr(-1, dest);
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest)
-{
-  intptr_t res = __sync_lock_test_and_set (dest, exchange_value);
-  FULL_MEM_BARRIER;
-  return res;
-}
-
-inline jlong Atomic::cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value, cmpxchg_memory_order order)
-{
-  return generic_cmpxchg(exchange_value, dest, compare_value, order);
-}
-
-inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, cmpxchg_memory_order order)
-{
-  return generic_cmpxchg(exchange_value, dest, compare_value, order);
-}
-
-inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value, cmpxchg_memory_order order)
-{
-  return (void *) cmpxchg_ptr((intptr_t) exchange_value,
-                              (volatile intptr_t*) dest,
-                              (intptr_t) compare_value,
-                              order);
-}
-
-inline jlong Atomic::load(volatile jlong* src) { return *src; }
-
-#endif // OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
--- a/src/os_cpu/linux_aarch64/vm/orderAccess_linux_aarch64.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/linux_aarch64/vm/orderAccess_linux_aarch64.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
   }
--- a/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,479 @@
+/*
+ * 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.
+ *
+ * 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_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"
+#endif
+
+// 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    (jlong    store_value, jlong*    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    (jlong    store_value, volatile jlong*    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; }
+
+inline jlong Atomic::load(volatile jlong* src) { return *src; }
+
+//
+// machine barrier instructions:
+//
+// - sync            two-way memory barrier, aka fence
+// - lwsync          orders  Store|Store,
+//                            Load|Store,
+//                            Load|Load,
+//                   but not Store|Load
+// - eieio           orders memory accesses for device memory (only)
+// - isync           invalidates speculatively executed instructions
+//                   From the POWER ISA 2.06 documentation:
+//                    "[...] an isync instruction prevents the execution of
+//                   instructions following the isync until instructions
+//                   preceding the isync have completed, [...]"
+//                   From IBM's AIX assembler reference:
+//                    "The isync [...] instructions causes the processor to
+//                   refetch any instructions that might have been fetched
+//                   prior to the isync instruction. The instruction isync
+//                   causes the processor to wait for all previous instructions
+//                   to complete. Then any instructions already fetched are
+//                   discarded and instruction processing continues in the
+//                   environment established by the previous instructions."
+//
+// semantic barrier instructions:
+// (as defined in orderAccess.hpp)
+//
+// - release         orders Store|Store,       (maps to lwsync)
+//                           Load|Store
+// - acquire         orders  Load|Store,       (maps to lwsync)
+//                           Load|Load
+// - fence           orders Store|Store,       (maps to sync)
+//                           Load|Store,
+//                           Load|Load,
+//                          Store|Load
+//
+
+#define strasm_sync                       "\n  sync    \n"
+#define strasm_lwsync                     "\n  lwsync  \n"
+#define strasm_isync                      "\n  isync   \n"
+#define strasm_release                    strasm_lwsync
+#define strasm_acquire                    strasm_lwsync
+#define strasm_fence                      strasm_sync
+#define strasm_nobarrier                  ""
+#define strasm_nobarrier_clobber_memory   ""
+
+inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
+
+  unsigned int result;
+
+  __asm__ __volatile__ (
+    strasm_lwsync
+    "1: lwarx   %0,  0, %2    \n"
+    "   add     %0, %0, %1    \n"
+    "   stwcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_isync
+    : /*%0*/"=&r" (result)
+    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
+    : "cc", "memory" );
+
+  return (jint) result;
+}
+
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+
+  long result;
+
+  __asm__ __volatile__ (
+    strasm_lwsync
+    "1: ldarx   %0,  0, %2    \n"
+    "   add     %0, %0, %1    \n"
+    "   stdcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_isync
+    : /*%0*/"=&r" (result)
+    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
+    : "cc", "memory" );
+
+  return (intptr_t) result;
+}
+
+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    (volatile jint*     dest) {
+
+  unsigned int temp;
+
+  __asm__ __volatile__ (
+    strasm_nobarrier
+    "1: lwarx   %0,  0, %2    \n"
+    "   addic   %0, %0,  1    \n"
+    "   stwcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_nobarrier
+    : /*%0*/"=&r" (temp), "=m" (*dest)
+    : /*%2*/"r" (dest), "m" (*dest)
+    : "cc" strasm_nobarrier_clobber_memory);
+
+}
+
+inline void Atomic::inc_ptr(volatile intptr_t* dest) {
+
+  long temp;
+
+  __asm__ __volatile__ (
+    strasm_nobarrier
+    "1: ldarx   %0,  0, %2    \n"
+    "   addic   %0, %0,  1    \n"
+    "   stdcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_nobarrier
+    : /*%0*/"=&r" (temp), "=m" (*dest)
+    : /*%2*/"r" (dest), "m" (*dest)
+    : "cc" strasm_nobarrier_clobber_memory);
+
+}
+
+inline void Atomic::inc_ptr(volatile void*     dest) {
+  inc_ptr((volatile intptr_t*)dest);
+}
+
+
+inline void Atomic::dec    (volatile jint*     dest) {
+
+  unsigned int temp;
+
+  __asm__ __volatile__ (
+    strasm_nobarrier
+    "1: lwarx   %0,  0, %2    \n"
+    "   addic   %0, %0, -1    \n"
+    "   stwcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_nobarrier
+    : /*%0*/"=&r" (temp), "=m" (*dest)
+    : /*%2*/"r" (dest), "m" (*dest)
+    : "cc" strasm_nobarrier_clobber_memory);
+
+}
+
+inline void Atomic::dec_ptr(volatile intptr_t* dest) {
+
+  long temp;
+
+  __asm__ __volatile__ (
+    strasm_nobarrier
+    "1: ldarx   %0,  0, %2    \n"
+    "   addic   %0, %0, -1    \n"
+    "   stdcx.  %0,  0, %2    \n"
+    "   bne-    1b            \n"
+    strasm_nobarrier
+    : /*%0*/"=&r" (temp), "=m" (*dest)
+    : /*%2*/"r" (dest), "m" (*dest)
+    : "cc" strasm_nobarrier_clobber_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) {
+
+  // Note that xchg_ptr doesn't necessarily do an acquire
+  // (see synchronizer.cpp).
+
+  unsigned int old_value;
+  const uint64_t zero = 0;
+
+  __asm__ __volatile__ (
+    /* lwsync */
+    strasm_lwsync
+    /* atomic loop */
+    "1:                                                 \n"
+    "   lwarx   %[old_value], %[dest], %[zero]          \n"
+    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
+    "   bne-    1b                                      \n"
+    /* isync */
+    strasm_sync
+    /* exit */
+    "2:                                                 \n"
+    /* out */
+    : [old_value]       "=&r"   (old_value),
+                        "=m"    (*dest)
+    /* in */
+    : [dest]            "b"     (dest),
+      [zero]            "r"     (zero),
+      [exchange_value]  "r"     (exchange_value),
+                        "m"     (*dest)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  return (jint) old_value;
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
+
+  // Note that xchg_ptr doesn't necessarily do an acquire
+  // (see synchronizer.cpp).
+
+  long old_value;
+  const uint64_t zero = 0;
+
+  __asm__ __volatile__ (
+    /* lwsync */
+    strasm_lwsync
+    /* atomic loop */
+    "1:                                                 \n"
+    "   ldarx   %[old_value], %[dest], %[zero]          \n"
+    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
+    "   bne-    1b                                      \n"
+    /* isync */
+    strasm_sync
+    /* exit */
+    "2:                                                 \n"
+    /* out */
+    : [old_value]       "=&r"   (old_value),
+                        "=m"    (*dest)
+    /* in */
+    : [dest]            "b"     (dest),
+      [zero]            "r"     (zero),
+      [exchange_value]  "r"     (exchange_value),
+                        "m"     (*dest)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  return (intptr_t) old_value;
+}
+
+inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
+  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
+}
+
+inline void cmpxchg_pre_membar(cmpxchg_memory_order order) {
+  if (order != memory_order_relaxed) {
+    __asm__ __volatile__ (
+      /* fence */
+      strasm_sync
+      );
+  }
+}
+
+inline void cmpxchg_post_membar(cmpxchg_memory_order order) {
+  if (order != memory_order_relaxed) {
+    __asm__ __volatile__ (
+      /* fence */
+      strasm_sync
+      );
+  }
+}
+
+#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
+inline jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, cmpxchg_memory_order order) {
+
+  // Note that cmpxchg guarantees a two-way memory barrier across
+  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
+  // specified otherwise (see atomic.hpp).
+
+  // Using 32 bit internally.
+  volatile int *dest_base = (volatile int*)((uintptr_t)dest & ~3);
+
+#ifdef VM_LITTLE_ENDIAN
+  const unsigned int shift_amount        = ((uintptr_t)dest & 3) * 8;
+#else
+  const unsigned int shift_amount        = ((~(uintptr_t)dest) & 3) * 8;
+#endif
+  const unsigned int masked_compare_val  = ((unsigned int)(unsigned char)compare_value),
+                     masked_exchange_val = ((unsigned int)(unsigned char)exchange_value),
+                     xor_value           = (masked_compare_val ^ masked_exchange_val) << shift_amount;
+
+  unsigned int old_value, value32;
+
+  cmpxchg_pre_membar(order);
+
+  __asm__ __volatile__ (
+    /* simple guard */
+    "   lbz     %[old_value], 0(%[dest])                  \n"
+    "   cmpw    %[masked_compare_val], %[old_value]       \n"
+    "   bne-    2f                                        \n"
+    /* atomic loop */
+    "1:                                                   \n"
+    "   lwarx   %[value32], 0, %[dest_base]               \n"
+    /* extract byte and compare */
+    "   srd     %[old_value], %[value32], %[shift_amount] \n"
+    "   clrldi  %[old_value], %[old_value], 56            \n"
+    "   cmpw    %[masked_compare_val], %[old_value]       \n"
+    "   bne-    2f                                        \n"
+    /* replace byte and try to store */
+    "   xor     %[value32], %[xor_value], %[value32]      \n"
+    "   stwcx.  %[value32], 0, %[dest_base]               \n"
+    "   bne-    1b                                        \n"
+    /* exit */
+    "2:                                                   \n"
+    /* out */
+    : [old_value]           "=&r"   (old_value),
+      [value32]             "=&r"   (value32),
+                            "=m"    (*dest),
+                            "=m"    (*dest_base)
+    /* in */
+    : [dest]                "b"     (dest),
+      [dest_base]           "b"     (dest_base),
+      [shift_amount]        "r"     (shift_amount),
+      [masked_compare_val]  "r"     (masked_compare_val),
+      [xor_value]           "r"     (xor_value),
+                            "m"     (*dest),
+                            "m"     (*dest_base)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  cmpxchg_post_membar(order);
+
+  return (jbyte)(unsigned char)old_value;
+}
+
+inline jint Atomic::cmpxchg(jint exchange_value, volatile jint* dest, jint compare_value, cmpxchg_memory_order order) {
+
+  // Note that cmpxchg guarantees a two-way memory barrier across
+  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
+  // specified otherwise (see atomic.hpp).
+
+  unsigned int old_value;
+  const uint64_t zero = 0;
+
+  cmpxchg_pre_membar(order);
+
+  __asm__ __volatile__ (
+    /* simple guard */
+    "   lwz     %[old_value], 0(%[dest])                \n"
+    "   cmpw    %[compare_value], %[old_value]          \n"
+    "   bne-    2f                                      \n"
+    /* atomic loop */
+    "1:                                                 \n"
+    "   lwarx   %[old_value], %[dest], %[zero]          \n"
+    "   cmpw    %[compare_value], %[old_value]          \n"
+    "   bne-    2f                                      \n"
+    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
+    "   bne-    1b                                      \n"
+    /* exit */
+    "2:                                                 \n"
+    /* out */
+    : [old_value]       "=&r"   (old_value),
+                        "=m"    (*dest)
+    /* in */
+    : [dest]            "b"     (dest),
+      [zero]            "r"     (zero),
+      [compare_value]   "r"     (compare_value),
+      [exchange_value]  "r"     (exchange_value),
+                        "m"     (*dest)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  cmpxchg_post_membar(order);
+
+  return (jint) old_value;
+}
+
+inline jlong Atomic::cmpxchg(jlong exchange_value, volatile jlong* dest, jlong compare_value, cmpxchg_memory_order order) {
+
+  // Note that cmpxchg guarantees a two-way memory barrier across
+  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
+  // specified otherwise (see atomic.hpp).
+
+  long old_value;
+  const uint64_t zero = 0;
+
+  cmpxchg_pre_membar(order);
+
+  __asm__ __volatile__ (
+    /* simple guard */
+    "   ld      %[old_value], 0(%[dest])                \n"
+    "   cmpd    %[compare_value], %[old_value]          \n"
+    "   bne-    2f                                      \n"
+    /* atomic loop */
+    "1:                                                 \n"
+    "   ldarx   %[old_value], %[dest], %[zero]          \n"
+    "   cmpd    %[compare_value], %[old_value]          \n"
+    "   bne-    2f                                      \n"
+    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
+    "   bne-    1b                                      \n"
+    /* exit */
+    "2:                                                 \n"
+    /* out */
+    : [old_value]       "=&r"   (old_value),
+                        "=m"    (*dest)
+    /* in */
+    : [dest]            "b"     (dest),
+      [zero]            "r"     (zero),
+      [compare_value]   "r"     (compare_value),
+      [exchange_value]  "r"     (exchange_value),
+                        "m"     (*dest)
+    /* clobber */
+    : "cc",
+      "memory"
+    );
+
+  cmpxchg_post_membar(order);
+
+  return (jlong) old_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);
+}
+
+#undef strasm_sync
+#undef strasm_lwsync
+#undef strasm_isync
+#undef strasm_release
+#undef strasm_acquire
+#undef strasm_fence
+#undef strasm_nobarrier
+#undef strasm_nobarrier_clobber_memory
+
+#endif // OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_HPP
--- a/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,482 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, 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.
- *
- * 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_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 PPC64
-#error "Atomic currently only implemented for PPC64"
-#endif
-
-// 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    (jlong    store_value, jlong*    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    (jlong    store_value, volatile jlong*    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; }
-
-inline jlong Atomic::load(volatile jlong* src) { return *src; }
-
-//
-// machine barrier instructions:
-//
-// - sync            two-way memory barrier, aka fence
-// - lwsync          orders  Store|Store,
-//                            Load|Store,
-//                            Load|Load,
-//                   but not Store|Load
-// - eieio           orders memory accesses for device memory (only)
-// - isync           invalidates speculatively executed instructions
-//                   From the POWER ISA 2.06 documentation:
-//                    "[...] an isync instruction prevents the execution of
-//                   instructions following the isync until instructions
-//                   preceding the isync have completed, [...]"
-//                   From IBM's AIX assembler reference:
-//                    "The isync [...] instructions causes the processor to
-//                   refetch any instructions that might have been fetched
-//                   prior to the isync instruction. The instruction isync
-//                   causes the processor to wait for all previous instructions
-//                   to complete. Then any instructions already fetched are
-//                   discarded and instruction processing continues in the
-//                   environment established by the previous instructions."
-//
-// semantic barrier instructions:
-// (as defined in orderAccess.hpp)
-//
-// - release         orders Store|Store,       (maps to lwsync)
-//                           Load|Store
-// - acquire         orders  Load|Store,       (maps to lwsync)
-//                           Load|Load
-// - fence           orders Store|Store,       (maps to sync)
-//                           Load|Store,
-//                           Load|Load,
-//                          Store|Load
-//
-
-#define strasm_sync                       "\n  sync    \n"
-#define strasm_lwsync                     "\n  lwsync  \n"
-#define strasm_isync                      "\n  isync   \n"
-#define strasm_release                    strasm_lwsync
-#define strasm_acquire                    strasm_lwsync
-#define strasm_fence                      strasm_sync
-#define strasm_nobarrier                  ""
-#define strasm_nobarrier_clobber_memory   ""
-
-inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
-
-  unsigned int result;
-
-  __asm__ __volatile__ (
-    strasm_lwsync
-    "1: lwarx   %0,  0, %2    \n"
-    "   add     %0, %0, %1    \n"
-    "   stwcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_isync
-    : /*%0*/"=&r" (result)
-    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
-    : "cc", "memory" );
-
-  return (jint) result;
-}
-
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-
-  long result;
-
-  __asm__ __volatile__ (
-    strasm_lwsync
-    "1: ldarx   %0,  0, %2    \n"
-    "   add     %0, %0, %1    \n"
-    "   stdcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_isync
-    : /*%0*/"=&r" (result)
-    : /*%1*/"r" (add_value), /*%2*/"r" (dest)
-    : "cc", "memory" );
-
-  return (intptr_t) result;
-}
-
-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    (volatile jint*     dest) {
-
-  unsigned int temp;
-
-  __asm__ __volatile__ (
-    strasm_nobarrier
-    "1: lwarx   %0,  0, %2    \n"
-    "   addic   %0, %0,  1    \n"
-    "   stwcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_nobarrier
-    : /*%0*/"=&r" (temp), "=m" (*dest)
-    : /*%2*/"r" (dest), "m" (*dest)
-    : "cc" strasm_nobarrier_clobber_memory);
-
-}
-
-inline void Atomic::inc_ptr(volatile intptr_t* dest) {
-
-  long temp;
-
-  __asm__ __volatile__ (
-    strasm_nobarrier
-    "1: ldarx   %0,  0, %2    \n"
-    "   addic   %0, %0,  1    \n"
-    "   stdcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_nobarrier
-    : /*%0*/"=&r" (temp), "=m" (*dest)
-    : /*%2*/"r" (dest), "m" (*dest)
-    : "cc" strasm_nobarrier_clobber_memory);
-
-}
-
-inline void Atomic::inc_ptr(volatile void*     dest) {
-  inc_ptr((volatile intptr_t*)dest);
-}
-
-
-inline void Atomic::dec    (volatile jint*     dest) {
-
-  unsigned int temp;
-
-  __asm__ __volatile__ (
-    strasm_nobarrier
-    "1: lwarx   %0,  0, %2    \n"
-    "   addic   %0, %0, -1    \n"
-    "   stwcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_nobarrier
-    : /*%0*/"=&r" (temp), "=m" (*dest)
-    : /*%2*/"r" (dest), "m" (*dest)
-    : "cc" strasm_nobarrier_clobber_memory);
-
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest) {
-
-  long temp;
-
-  __asm__ __volatile__ (
-    strasm_nobarrier
-    "1: ldarx   %0,  0, %2    \n"
-    "   addic   %0, %0, -1    \n"
-    "   stdcx.  %0,  0, %2    \n"
-    "   bne-    1b            \n"
-    strasm_nobarrier
-    : /*%0*/"=&r" (temp), "=m" (*dest)
-    : /*%2*/"r" (dest), "m" (*dest)
-    : "cc" strasm_nobarrier_clobber_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) {
-
-  // Note that xchg_ptr doesn't necessarily do an acquire
-  // (see synchronizer.cpp).
-
-  unsigned int old_value;
-  const uint64_t zero = 0;
-
-  __asm__ __volatile__ (
-    /* lwsync */
-    strasm_lwsync
-    /* atomic loop */
-    "1:                                                 \n"
-    "   lwarx   %[old_value], %[dest], %[zero]          \n"
-    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
-    "   bne-    1b                                      \n"
-    /* isync */
-    strasm_sync
-    /* exit */
-    "2:                                                 \n"
-    /* out */
-    : [old_value]       "=&r"   (old_value),
-                        "=m"    (*dest)
-    /* in */
-    : [dest]            "b"     (dest),
-      [zero]            "r"     (zero),
-      [exchange_value]  "r"     (exchange_value),
-                        "m"     (*dest)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  return (jint) old_value;
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-
-  // Note that xchg_ptr doesn't necessarily do an acquire
-  // (see synchronizer.cpp).
-
-  long old_value;
-  const uint64_t zero = 0;
-
-  __asm__ __volatile__ (
-    /* lwsync */
-    strasm_lwsync
-    /* atomic loop */
-    "1:                                                 \n"
-    "   ldarx   %[old_value], %[dest], %[zero]          \n"
-    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
-    "   bne-    1b                                      \n"
-    /* isync */
-    strasm_sync
-    /* exit */
-    "2:                                                 \n"
-    /* out */
-    : [old_value]       "=&r"   (old_value),
-                        "=m"    (*dest)
-    /* in */
-    : [dest]            "b"     (dest),
-      [zero]            "r"     (zero),
-      [exchange_value]  "r"     (exchange_value),
-                        "m"     (*dest)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  return (intptr_t) old_value;
-}
-
-inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
-  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
-}
-
-inline void cmpxchg_pre_membar(cmpxchg_memory_order order) {
-  if (order != memory_order_relaxed) {
-    __asm__ __volatile__ (
-      /* fence */
-      strasm_sync
-      );
-  }
-}
-
-inline void cmpxchg_post_membar(cmpxchg_memory_order order) {
-  if (order != memory_order_relaxed) {
-    __asm__ __volatile__ (
-      /* fence */
-      strasm_sync
-      );
-  }
-}
-
-#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-inline jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, cmpxchg_memory_order order) {
-
-  // Note that cmpxchg guarantees a two-way memory barrier across
-  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
-  // specified otherwise (see atomic.hpp).
-
-  // Using 32 bit internally.
-  volatile int *dest_base = (volatile int*)((uintptr_t)dest & ~3);
-
-#ifdef VM_LITTLE_ENDIAN
-  const unsigned int shift_amount        = ((uintptr_t)dest & 3) * 8;
-#else
-  const unsigned int shift_amount        = ((~(uintptr_t)dest) & 3) * 8;
-#endif
-  const unsigned int masked_compare_val  = ((unsigned int)(unsigned char)compare_value),
-                     masked_exchange_val = ((unsigned int)(unsigned char)exchange_value),
-                     xor_value           = (masked_compare_val ^ masked_exchange_val) << shift_amount;
-
-  unsigned int old_value, value32;
-
-  cmpxchg_pre_membar(order);
-
-  __asm__ __volatile__ (
-    /* simple guard */
-    "   lbz     %[old_value], 0(%[dest])                  \n"
-    "   cmpw    %[masked_compare_val], %[old_value]       \n"
-    "   bne-    2f                                        \n"
-    /* atomic loop */
-    "1:                                                   \n"
-    "   lwarx   %[value32], 0, %[dest_base]               \n"
-    /* extract byte and compare */
-    "   srd     %[old_value], %[value32], %[shift_amount] \n"
-    "   clrldi  %[old_value], %[old_value], 56            \n"
-    "   cmpw    %[masked_compare_val], %[old_value]       \n"
-    "   bne-    2f                                        \n"
-    /* replace byte and try to store */
-    "   xor     %[value32], %[xor_value], %[value32]      \n"
-    "   stwcx.  %[value32], 0, %[dest_base]               \n"
-    "   bne-    1b                                        \n"
-    /* exit */
-    "2:                                                   \n"
-    /* out */
-    : [old_value]           "=&r"   (old_value),
-      [value32]             "=&r"   (value32),
-                            "=m"    (*dest),
-                            "=m"    (*dest_base)
-    /* in */
-    : [dest]                "b"     (dest),
-      [dest_base]           "b"     (dest_base),
-      [shift_amount]        "r"     (shift_amount),
-      [masked_compare_val]  "r"     (masked_compare_val),
-      [xor_value]           "r"     (xor_value),
-                            "m"     (*dest),
-                            "m"     (*dest_base)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  cmpxchg_post_membar(order);
-
-  return (jbyte)(unsigned char)old_value;
-}
-
-inline jint Atomic::cmpxchg(jint exchange_value, volatile jint* dest, jint compare_value, cmpxchg_memory_order order) {
-
-  // Note that cmpxchg guarantees a two-way memory barrier across
-  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
-  // specified otherwise (see atomic.hpp).
-
-  unsigned int old_value;
-  const uint64_t zero = 0;
-
-  cmpxchg_pre_membar(order);
-
-  __asm__ __volatile__ (
-    /* simple guard */
-    "   lwz     %[old_value], 0(%[dest])                \n"
-    "   cmpw    %[compare_value], %[old_value]          \n"
-    "   bne-    2f                                      \n"
-    /* atomic loop */
-    "1:                                                 \n"
-    "   lwarx   %[old_value], %[dest], %[zero]          \n"
-    "   cmpw    %[compare_value], %[old_value]          \n"
-    "   bne-    2f                                      \n"
-    "   stwcx.  %[exchange_value], %[dest], %[zero]     \n"
-    "   bne-    1b                                      \n"
-    /* exit */
-    "2:                                                 \n"
-    /* out */
-    : [old_value]       "=&r"   (old_value),
-                        "=m"    (*dest)
-    /* in */
-    : [dest]            "b"     (dest),
-      [zero]            "r"     (zero),
-      [compare_value]   "r"     (compare_value),
-      [exchange_value]  "r"     (exchange_value),
-                        "m"     (*dest)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  cmpxchg_post_membar(order);
-
-  return (jint) old_value;
-}
-
-inline jlong Atomic::cmpxchg(jlong exchange_value, volatile jlong* dest, jlong compare_value, cmpxchg_memory_order order) {
-
-  // Note that cmpxchg guarantees a two-way memory barrier across
-  // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
-  // specified otherwise (see atomic.hpp).
-
-  long old_value;
-  const uint64_t zero = 0;
-
-  cmpxchg_pre_membar(order);
-
-  __asm__ __volatile__ (
-    /* simple guard */
-    "   ld      %[old_value], 0(%[dest])                \n"
-    "   cmpd    %[compare_value], %[old_value]          \n"
-    "   bne-    2f                                      \n"
-    /* atomic loop */
-    "1:                                                 \n"
-    "   ldarx   %[old_value], %[dest], %[zero]          \n"
-    "   cmpd    %[compare_value], %[old_value]          \n"
-    "   bne-    2f                                      \n"
-    "   stdcx.  %[exchange_value], %[dest], %[zero]     \n"
-    "   bne-    1b                                      \n"
-    /* exit */
-    "2:                                                 \n"
-    /* out */
-    : [old_value]       "=&r"   (old_value),
-                        "=m"    (*dest)
-    /* in */
-    : [dest]            "b"     (dest),
-      [zero]            "r"     (zero),
-      [compare_value]   "r"     (compare_value),
-      [exchange_value]  "r"     (exchange_value),
-                        "m"     (*dest)
-    /* clobber */
-    : "cc",
-      "memory"
-    );
-
-  cmpxchg_post_membar(order);
-
-  return (jlong) old_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);
-}
-
-#undef strasm_sync
-#undef strasm_lwsync
-#undef strasm_isync
-#undef strasm_release
-#undef strasm_acquire
-#undef strasm_fence
-#undef strasm_nobarrier
-#undef strasm_nobarrier_clobber_memory
-
-#endif // OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
--- a/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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; }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/linux_x86/vm/atomic_linux_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,227 @@
+/*
+ * 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
+ * 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_HPP
+#define OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_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_HPP
--- a/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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
--- a/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/os_cpu/linux_x86/vm/thread_linux_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/linux_x86/vm/thread_linux_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
   }
--- a/src/os_cpu/linux_x86/vm/thread_linux_x86.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/linux_x86/vm/thread_linux_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/linux_zero/vm/atomic_linux_zero.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,327 @@
+/*
+ * 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.
+ *
+ * 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_ZERO_VM_ATOMIC_LINUX_ZERO_HPP
+#define OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_HPP
+
+#include "runtime/os.hpp"
+
+// Implementation of class atomic
+
+#ifdef M68K
+
+/*
+ * __m68k_cmpxchg
+ *
+ * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
+ * Returns newval on success and oldval if no exchange happened.
+ * This implementation is processor specific and works on
+ * 68020 68030 68040 and 68060.
+ *
+ * It will not work on ColdFire, 68000 and 68010 since they lack the CAS
+ * instruction.
+ * Using a kernelhelper would be better for arch complete implementation.
+ *
+ */
+
+static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) {
+  int ret;
+  __asm __volatile ("cas%.l %0,%2,%1"
+                   : "=d" (ret), "+m" (*(ptr))
+                   : "d" (newval), "0" (oldval));
+  return ret;
+}
+
+/* Perform an atomic compare and swap: if the current value of `*PTR'
+   is OLDVAL, then write NEWVAL into `*PTR'.  Return the contents of
+   `*PTR' before the operation.*/
+static inline int m68k_compare_and_swap(volatile int *ptr,
+                                        int oldval,
+                                        int newval) {
+  for (;;) {
+      int prev = *ptr;
+      if (prev != oldval)
+        return prev;
+
+      if (__m68k_cmpxchg (prev, newval, ptr) == newval)
+        // Success.
+        return prev;
+
+      // We failed even though prev == oldval.  Try again.
+    }
+}
+
+/* Atomically add an int to memory.  */
+static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) {
+  for (;;) {
+      // Loop until success.
+
+      int prev = *ptr;
+
+      if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value)
+        return prev + add_value;
+    }
+}
+
+/* Atomically write VALUE into `*PTR' and returns the previous
+   contents of `*PTR'.  */
+static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) {
+  for (;;) {
+      // Loop until success.
+      int prev = *ptr;
+
+      if (__m68k_cmpxchg (prev, newval, ptr) == prev)
+        return prev;
+    }
+}
+#endif // M68K
+
+#ifdef ARM
+
+/*
+ * __kernel_cmpxchg
+ *
+ * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
+ * Return zero if *ptr was changed or non-zero if no exchange happened.
+ * The C flag is also set if *ptr was changed to allow for assembly
+ * optimization in the calling code.
+ *
+ */
+
+typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
+#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0)
+
+
+
+/* Perform an atomic compare and swap: if the current value of `*PTR'
+   is OLDVAL, then write NEWVAL into `*PTR'.  Return the contents of
+   `*PTR' before the operation.*/
+static inline int arm_compare_and_swap(volatile int *ptr,
+                                       int oldval,
+                                       int newval) {
+  for (;;) {
+      int prev = *ptr;
+      if (prev != oldval)
+        return prev;
+
+      if (__kernel_cmpxchg (prev, newval, ptr) == 0)
+        // Success.
+        return prev;
+
+      // We failed even though prev == oldval.  Try again.
+    }
+}
+
+/* Atomically add an int to memory.  */
+static inline int arm_add_and_fetch(volatile int *ptr, int add_value) {
+  for (;;) {
+      // Loop until a __kernel_cmpxchg succeeds.
+
+      int prev = *ptr;
+
+      if (__kernel_cmpxchg (prev, prev + add_value, ptr) == 0)
+        return prev + add_value;
+    }
+}
+
+/* Atomically write VALUE into `*PTR' and returns the previous
+   contents of `*PTR'.  */
+static inline int arm_lock_test_and_set(volatile int *ptr, int newval) {
+  for (;;) {
+      // Loop until a __kernel_cmpxchg succeeds.
+      int prev = *ptr;
+
+      if (__kernel_cmpxchg (prev, newval, ptr) == 0)
+        return prev;
+    }
+}
+#endif // ARM
+
+inline void Atomic::store(jint store_value, volatile jint* dest) {
+  *dest = store_value;
+}
+
+inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) {
+  *dest = store_value;
+}
+
+inline jint Atomic::add(jint add_value, volatile jint* dest) {
+#ifdef ARM
+  return arm_add_and_fetch(dest, add_value);
+#else
+#ifdef M68K
+  return m68k_add_and_fetch(dest, add_value);
+#else
+  return __sync_add_and_fetch(dest, add_value);
+#endif // M68K
+#endif // ARM
+}
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+#ifdef ARM
+  return arm_add_and_fetch(dest, add_value);
+#else
+#ifdef M68K
+  return m68k_add_and_fetch(dest, add_value);
+#else
+  return __sync_add_and_fetch(dest, add_value);
+#endif // M68K
+#endif // ARM
+}
+
+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(volatile jint* dest) {
+  add(1, dest);
+}
+
+inline void Atomic::inc_ptr(volatile intptr_t* dest) {
+  add_ptr(1, dest);
+}
+
+inline void Atomic::inc_ptr(volatile void* dest) {
+  add_ptr(1, dest);
+}
+
+inline void Atomic::dec(volatile jint* dest) {
+  add(-1, dest);
+}
+
+inline void Atomic::dec_ptr(volatile intptr_t* dest) {
+  add_ptr(-1, dest);
+}
+
+inline void Atomic::dec_ptr(volatile void* dest) {
+  add_ptr(-1, dest);
+}
+
+inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
+#ifdef ARM
+  return arm_lock_test_and_set(dest, exchange_value);
+#else
+#ifdef M68K
+  return m68k_lock_test_and_set(dest, exchange_value);
+#else
+  // __sync_lock_test_and_set is a bizarrely named atomic exchange
+  // operation.  Note that some platforms only support this with the
+  // limitation that the only valid value to store is the immediate
+  // constant 1.  There is a test for this in JNI_CreateJavaVM().
+  jint result = __sync_lock_test_and_set (dest, exchange_value);
+  // All atomic operations are expected to be full memory barriers
+  // (see atomic.hpp). However, __sync_lock_test_and_set is not
+  // a full memory barrier, but an acquire barrier. Hence, this added
+  // barrier.
+  __sync_synchronize();
+  return result;
+#endif // M68K
+#endif // ARM
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
+                                 volatile intptr_t* dest) {
+#ifdef ARM
+  return arm_lock_test_and_set(dest, exchange_value);
+#else
+#ifdef M68K
+  return m68k_lock_test_and_set(dest, exchange_value);
+#else
+  intptr_t result = __sync_lock_test_and_set (dest, exchange_value);
+  __sync_synchronize();
+  return result;
+#endif // M68K
+#endif // ARM
+}
+
+inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
+  return (void *) xchg_ptr((intptr_t) exchange_value,
+                           (volatile intptr_t*) dest);
+}
+
+inline jint Atomic::cmpxchg(jint exchange_value,
+                            volatile jint* dest,
+                            jint compare_value,
+                            cmpxchg_memory_order order) {
+#ifdef ARM
+  return arm_compare_and_swap(dest, compare_value, exchange_value);
+#else
+#ifdef M68K
+  return m68k_compare_and_swap(dest, compare_value, exchange_value);
+#else
+  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
+#endif // M68K
+#endif // ARM
+}
+
+inline jlong Atomic::cmpxchg(jlong exchange_value,
+                             volatile jlong* dest,
+                             jlong compare_value,
+                             cmpxchg_memory_order order) {
+
+  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
+}
+
+inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value,
+                                    volatile intptr_t* dest,
+                                    intptr_t compare_value,
+                                    cmpxchg_memory_order order) {
+#ifdef ARM
+  return arm_compare_and_swap(dest, compare_value, exchange_value);
+#else
+#ifdef M68K
+  return m68k_compare_and_swap(dest, compare_value, exchange_value);
+#else
+  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
+#endif // M68K
+#endif // ARM
+}
+
+inline void* Atomic::cmpxchg_ptr(void* exchange_value,
+                                 volatile void* dest,
+                                 void* compare_value,
+                                 cmpxchg_memory_order order) {
+
+  return (void *) cmpxchg_ptr((intptr_t) exchange_value,
+                              (volatile intptr_t*) dest,
+                              (intptr_t) compare_value,
+                              order);
+}
+
+inline jlong Atomic::load(volatile jlong* src) {
+  volatile jlong dest;
+  os::atomic_copy64(src, &dest);
+  return dest;
+}
+
+inline void Atomic::store(jlong store_value, jlong* dest) {
+  os::atomic_copy64((volatile jlong*)&store_value, (volatile jlong*)dest);
+}
+
+inline void Atomic::store(jlong store_value, volatile jlong* dest) {
+  os::atomic_copy64((volatile jlong*)&store_value, dest);
+}
+
+#endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_HPP
--- a/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,328 +0,0 @@
-/*
- * Copyright (c) 2003, 2014, 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.
- *
- * 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_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
-#define OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
-
-// Implementation of class atomic
-
-#ifdef M68K
-
-/*
- * __m68k_cmpxchg
- *
- * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
- * Returns newval on success and oldval if no exchange happened.
- * This implementation is processor specific and works on
- * 68020 68030 68040 and 68060.
- *
- * It will not work on ColdFire, 68000 and 68010 since they lack the CAS
- * instruction.
- * Using a kernelhelper would be better for arch complete implementation.
- *
- */
-
-static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) {
-  int ret;
-  __asm __volatile ("cas%.l %0,%2,%1"
-                   : "=d" (ret), "+m" (*(ptr))
-                   : "d" (newval), "0" (oldval));
-  return ret;
-}
-
-/* Perform an atomic compare and swap: if the current value of `*PTR'
-   is OLDVAL, then write NEWVAL into `*PTR'.  Return the contents of
-   `*PTR' before the operation.*/
-static inline int m68k_compare_and_swap(volatile int *ptr,
-                                        int oldval,
-                                        int newval) {
-  for (;;) {
-      int prev = *ptr;
-      if (prev != oldval)
-        return prev;
-
-      if (__m68k_cmpxchg (prev, newval, ptr) == newval)
-        // Success.
-        return prev;
-
-      // We failed even though prev == oldval.  Try again.
-    }
-}
-
-/* Atomically add an int to memory.  */
-static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) {
-  for (;;) {
-      // Loop until success.
-
-      int prev = *ptr;
-
-      if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value)
-        return prev + add_value;
-    }
-}
-
-/* Atomically write VALUE into `*PTR' and returns the previous
-   contents of `*PTR'.  */
-static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) {
-  for (;;) {
-      // Loop until success.
-      int prev = *ptr;
-
-      if (__m68k_cmpxchg (prev, newval, ptr) == prev)
-        return prev;
-    }
-}
-#endif // M68K
-
-#ifdef ARM
-
-/*
- * __kernel_cmpxchg
- *
- * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
- * Return zero if *ptr was changed or non-zero if no exchange happened.
- * The C flag is also set if *ptr was changed to allow for assembly
- * optimization in the calling code.
- *
- */
-
-typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
-#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0)
-
-
-
-/* Perform an atomic compare and swap: if the current value of `*PTR'
-   is OLDVAL, then write NEWVAL into `*PTR'.  Return the contents of
-   `*PTR' before the operation.*/
-static inline int arm_compare_and_swap(volatile int *ptr,
-                                       int oldval,
-                                       int newval) {
-  for (;;) {
-      int prev = *ptr;
-      if (prev != oldval)
-        return prev;
-
-      if (__kernel_cmpxchg (prev, newval, ptr) == 0)
-        // Success.
-        return prev;
-
-      // We failed even though prev == oldval.  Try again.
-    }
-}
-
-/* Atomically add an int to memory.  */
-static inline int arm_add_and_fetch(volatile int *ptr, int add_value) {
-  for (;;) {
-      // Loop until a __kernel_cmpxchg succeeds.
-
-      int prev = *ptr;
-
-      if (__kernel_cmpxchg (prev, prev + add_value, ptr) == 0)
-        return prev + add_value;
-    }
-}
-
-/* Atomically write VALUE into `*PTR' and returns the previous
-   contents of `*PTR'.  */
-static inline int arm_lock_test_and_set(volatile int *ptr, int newval) {
-  for (;;) {
-      // Loop until a __kernel_cmpxchg succeeds.
-      int prev = *ptr;
-
-      if (__kernel_cmpxchg (prev, newval, ptr) == 0)
-        return prev;
-    }
-}
-#endif // ARM
-
-inline void Atomic::store(jint store_value, volatile jint* dest) {
-  *dest = store_value;
-}
-
-inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) {
-  *dest = store_value;
-}
-
-inline jint Atomic::add(jint add_value, volatile jint* dest) {
-#ifdef ARM
-  return arm_add_and_fetch(dest, add_value);
-#else
-#ifdef M68K
-  return m68k_add_and_fetch(dest, add_value);
-#else
-  return __sync_add_and_fetch(dest, add_value);
-#endif // M68K
-#endif // ARM
-}
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-#ifdef ARM
-  return arm_add_and_fetch(dest, add_value);
-#else
-#ifdef M68K
-  return m68k_add_and_fetch(dest, add_value);
-#else
-  return __sync_add_and_fetch(dest, add_value);
-#endif // M68K
-#endif // ARM
-}
-
-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(volatile jint* dest) {
-  add(1, dest);
-}
-
-inline void Atomic::inc_ptr(volatile intptr_t* dest) {
-  add_ptr(1, dest);
-}
-
-inline void Atomic::inc_ptr(volatile void* dest) {
-  add_ptr(1, dest);
-}
-
-inline void Atomic::dec(volatile jint* dest) {
-  add(-1, dest);
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest) {
-  add_ptr(-1, dest);
-}
-
-inline void Atomic::dec_ptr(volatile void* dest) {
-  add_ptr(-1, dest);
-}
-
-inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
-#ifdef ARM
-  return arm_lock_test_and_set(dest, exchange_value);
-#else
-#ifdef M68K
-  return m68k_lock_test_and_set(dest, exchange_value);
-#else
-  // __sync_lock_test_and_set is a bizarrely named atomic exchange
-  // operation.  Note that some platforms only support this with the
-  // limitation that the only valid value to store is the immediate
-  // constant 1.  There is a test for this in JNI_CreateJavaVM().
-  jint result = __sync_lock_test_and_set (dest, exchange_value);
-  // All atomic operations are expected to be full memory barriers
-  // (see atomic.hpp). However, __sync_lock_test_and_set is not
-  // a full memory barrier, but an acquire barrier. Hence, this added
-  // barrier.
-  __sync_synchronize();
-  return result;
-#endif // M68K
-#endif // ARM
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
-                                 volatile intptr_t* dest) {
-#ifdef ARM
-  return arm_lock_test_and_set(dest, exchange_value);
-#else
-#ifdef M68K
-  return m68k_lock_test_and_set(dest, exchange_value);
-#else
-  intptr_t result = __sync_lock_test_and_set (dest, exchange_value);
-  __sync_synchronize();
-  return result;
-#endif // M68K
-#endif // ARM
-}
-
-inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
-  return (void *) xchg_ptr((intptr_t) exchange_value,
-                           (volatile intptr_t*) dest);
-}
-
-inline jint Atomic::cmpxchg(jint exchange_value,
-                            volatile jint* dest,
-                            jint compare_value,
-                            cmpxchg_memory_order order) {
-#ifdef ARM
-  return arm_compare_and_swap(dest, compare_value, exchange_value);
-#else
-#ifdef M68K
-  return m68k_compare_and_swap(dest, compare_value, exchange_value);
-#else
-  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-#endif // M68K
-#endif // ARM
-}
-
-inline jlong Atomic::cmpxchg(jlong exchange_value,
-                             volatile jlong* dest,
-                             jlong compare_value,
-                             cmpxchg_memory_order order) {
-
-  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-}
-
-inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value,
-                                    volatile intptr_t* dest,
-                                    intptr_t compare_value,
-                                    cmpxchg_memory_order order) {
-#ifdef ARM
-  return arm_compare_and_swap(dest, compare_value, exchange_value);
-#else
-#ifdef M68K
-  return m68k_compare_and_swap(dest, compare_value, exchange_value);
-#else
-  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-#endif // M68K
-#endif // ARM
-}
-
-inline void* Atomic::cmpxchg_ptr(void* exchange_value,
-                                 volatile void* dest,
-                                 void* compare_value,
-                                 cmpxchg_memory_order order) {
-
-  return (void *) cmpxchg_ptr((intptr_t) exchange_value,
-                              (volatile intptr_t*) dest,
-                              (intptr_t) compare_value,
-                              order);
-}
-
-inline jlong Atomic::load(volatile jlong* src) {
-  volatile jlong dest;
-  os::atomic_copy64(src, &dest);
-  return dest;
-}
-
-inline void Atomic::store(jlong store_value, jlong* dest) {
-  os::atomic_copy64((volatile jlong*)&store_value, (volatile jlong*)dest);
-}
-
-inline void Atomic::store(jlong store_value, volatile jlong* dest) {
-  os::atomic_copy64((volatile jlong*)&store_value, dest);
-}
-
-#endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,376 @@
+/*
+ * 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
+ * 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_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP
+#define OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_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; }
+
+inline void Atomic::inc    (volatile jint*     dest) { (void)add    (1, dest); }
+inline void Atomic::inc_ptr(volatile intptr_t* dest) { (void)add_ptr(1, dest); }
+inline void Atomic::inc_ptr(volatile void*     dest) { (void)add_ptr(1, dest); }
+
+inline void Atomic::dec    (volatile jint*     dest) { (void)add    (-1, dest); }
+inline void Atomic::dec_ptr(volatile intptr_t* dest) { (void)add_ptr(-1, dest); }
+inline void Atomic::dec_ptr(volatile void*     dest) { (void)add_ptr(-1, dest); }
+
+
+#ifdef _LP64
+
+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 jlong Atomic::load(volatile jlong* src) { return *src; }
+
+#else
+
+extern "C" void _Atomic_move_long_v9(volatile jlong* src, volatile jlong* dst);
+
+inline void Atomic_move_long(volatile jlong* src, volatile jlong* dst) {
+  _Atomic_move_long_v9(src, dst);
+}
+
+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
+
+#ifdef _GNU_SOURCE
+
+inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
+  intptr_t rv;
+  __asm__ volatile(
+    "1: \n\t"
+    " ld     [%2], %%o2\n\t"
+    " add    %1, %%o2, %%o3\n\t"
+    " cas    [%2], %%o2, %%o3\n\t"
+    " cmp    %%o2, %%o3\n\t"
+    " bne    1b\n\t"
+    "  nop\n\t"
+    " add    %1, %%o2, %0\n\t"
+    : "=r" (rv)
+    : "r" (add_value), "r" (dest)
+    : "memory", "o2", "o3");
+  return rv;
+}
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+  intptr_t rv;
+#ifdef _LP64
+  __asm__ volatile(
+    "1: \n\t"
+    " ldx    [%2], %%o2\n\t"
+    " add    %0, %%o2, %%o3\n\t"
+    " casx   [%2], %%o2, %%o3\n\t"
+    " cmp    %%o2, %%o3\n\t"
+    " bne    %%xcc, 1b\n\t"
+    "  nop\n\t"
+    " add    %0, %%o2, %0\n\t"
+    : "=r" (rv)
+    : "r" (add_value), "r" (dest)
+    : "memory", "o2", "o3");
+#else //_LP64
+  __asm__ volatile(
+    "1: \n\t"
+    " ld     [%2], %%o2\n\t"
+    " add    %1, %%o2, %%o3\n\t"
+    " cas    [%2], %%o2, %%o3\n\t"
+    " cmp    %%o2, %%o3\n\t"
+    " bne    1b\n\t"
+    "  nop\n\t"
+    " add    %1, %%o2, %0\n\t"
+    : "=r" (rv)
+    : "r" (add_value), "r" (dest)
+    : "memory", "o2", "o3");
+#endif // _LP64
+  return rv;
+}
+
+inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
+  return (void*)add_ptr((intptr_t)add_value, (volatile intptr_t*)dest);
+}
+
+
+inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
+  intptr_t rv = exchange_value;
+  __asm__ volatile(
+    " swap   [%2],%1\n\t"
+    : "=r" (rv)
+    : "0" (exchange_value) /* we use same register as for return value */, "r" (dest)
+    : "memory");
+  return rv;
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
+  intptr_t rv = exchange_value;
+#ifdef _LP64
+  __asm__ volatile(
+    "1:\n\t"
+    " mov    %1, %%o3\n\t"
+    " ldx    [%2], %%o2\n\t"
+    " casx   [%2], %%o2, %%o3\n\t"
+    " cmp    %%o2, %%o3\n\t"
+    " bne    %%xcc, 1b\n\t"
+    "  nop\n\t"
+    " mov    %%o2, %0\n\t"
+    : "=r" (rv)
+    : "r" (exchange_value), "r" (dest)
+    : "memory", "o2", "o3");
+#else  //_LP64
+  __asm__ volatile(
+    "swap    [%2],%1\n\t"
+    : "=r" (rv)
+    : "0" (exchange_value) /* we use same register as for return value */, "r" (dest)
+    : "memory");
+#endif // _LP64
+  return rv;
+}
+
+inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
+  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
+}
+
+
+inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
+  jint rv;
+  __asm__ volatile(
+    " cas    [%2], %3, %0"
+    : "=r" (rv)
+    : "0" (exchange_value), "r" (dest), "r" (compare_value)
+    : "memory");
+  return rv;
+}
+
+inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
+#ifdef _LP64
+  jlong rv;
+  __asm__ volatile(
+    " casx   [%2], %3, %0"
+    : "=r" (rv)
+    : "0" (exchange_value), "r" (dest), "r" (compare_value)
+    : "memory");
+  return rv;
+#else  //_LP64
+  volatile jlong_accessor evl, cvl, rv;
+  evl.long_value = exchange_value;
+  cvl.long_value = compare_value;
+
+  __asm__ volatile(
+    " sllx   %2, 32, %2\n\t"
+    " srl    %3, 0,  %3\n\t"
+    " or     %2, %3, %2\n\t"
+    " sllx   %5, 32, %5\n\t"
+    " srl    %6, 0,  %6\n\t"
+    " or     %5, %6, %5\n\t"
+    " casx   [%4], %5, %2\n\t"
+    " srl    %2, 0, %1\n\t"
+    " srlx   %2, 32, %0\n\t"
+    : "=r" (rv.words[0]), "=r" (rv.words[1])
+    : "r"  (evl.words[0]), "r" (evl.words[1]), "r" (dest), "r" (cvl.words[0]), "r" (cvl.words[1])
+    : "memory");
+
+  return rv.long_value;
+#endif  //_LP64
+}
+
+inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, cmpxchg_memory_order order) {
+  intptr_t rv;
+#ifdef _LP64
+  __asm__ volatile(
+    " casx    [%2], %3, %0"
+    : "=r" (rv)
+    : "0" (exchange_value), "r" (dest), "r" (compare_value)
+    : "memory");
+#else  //_LP64
+  __asm__ volatile(
+    " cas     [%2], %3, %0"
+    : "=r" (rv)
+    : "0" (exchange_value), "r" (dest), "r" (compare_value)
+    : "memory");
+#endif // _LP64
+  return rv;
+}
+
+inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value, cmpxchg_memory_order order) {
+  return (void*)cmpxchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest, (intptr_t)compare_value, order);
+}
+
+#else // _GNU_SOURCE
+
+#if defined(COMPILER2) || defined(_LP64)
+
+// This is the interface to the atomic instructions in solaris_sparc.il.
+// It's very messy because we need to support v8 and these instructions
+// are illegal there.  When sparc v8 is dropped, we can drop out lots of
+// this code.  Also compiler2 does not support v8 so the conditional code
+// omits the instruction set check.
+
+extern "C" jint     _Atomic_swap32(jint     exchange_value, volatile jint*     dest);
+extern "C" intptr_t _Atomic_swap64(intptr_t exchange_value, volatile intptr_t* dest);
+
+extern "C" jint     _Atomic_cas32(jint     exchange_value, volatile jint*     dest, jint     compare_value);
+extern "C" intptr_t _Atomic_cas64(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value);
+extern "C" jlong    _Atomic_casl (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value);
+
+extern "C" jint     _Atomic_add32(jint     inc,       volatile jint*     dest);
+extern "C" intptr_t _Atomic_add64(intptr_t add_value, volatile intptr_t* dest);
+
+
+inline jint     Atomic::add     (jint    add_value, volatile jint*     dest) {
+  return _Atomic_add32(add_value, dest);
+}
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+#ifdef _LP64
+  return _Atomic_add64(add_value, dest);
+#else  //_LP64
+  return _Atomic_add32(add_value, dest);
+#endif // _LP64
+}
+
+inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
+  return (void*)add_ptr((intptr_t)add_value, (volatile intptr_t*)dest);
+}
+
+
+inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
+  return _Atomic_swap32(exchange_value, dest);
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
+#ifdef _LP64
+  return _Atomic_swap64(exchange_value, dest);
+#else  // _LP64
+  return _Atomic_swap32(exchange_value, dest);
+#endif // _LP64
+}
+
+inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
+  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
+}
+
+
+inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
+  return _Atomic_cas32(exchange_value, dest, compare_value);
+}
+
+inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
+#ifdef _LP64
+  // Return 64 bit value in %o0
+  return _Atomic_cas64((intptr_t)exchange_value, (intptr_t *)dest, (intptr_t)compare_value);
+#else  // _LP64
+  // Return 64 bit value in %o0,%o1 by hand
+  return _Atomic_casl(exchange_value, dest, compare_value);
+#endif // _LP64
+}
+
+inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, cmpxchg_memory_order order) {
+#ifdef _LP64
+  return _Atomic_cas64(exchange_value, dest, compare_value);
+#else  // _LP64
+  return _Atomic_cas32(exchange_value, dest, compare_value);
+#endif // _LP64
+}
+
+inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value, cmpxchg_memory_order order) {
+  return (void*)cmpxchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest, (intptr_t)compare_value, order);
+}
+
+
+#else // _LP64 || COMPILER2
+
+
+// 32-bit compiler1 only
+
+inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
+  return (*os::atomic_add_func)(add_value, dest);
+}
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+  return (intptr_t)add((jint)add_value, (volatile jint*)dest);
+}
+
+inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
+  return (void*)add((jint)add_value, (volatile jint*)dest);
+}
+
+
+inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
+  return (*os::atomic_xchg_func)(exchange_value, 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);
+}
+
+inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
+  return (void*)xchg((jint)exchange_value, (volatile jint*)dest);
+}
+
+
+inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
+  return (*os::atomic_cmpxchg_func)(exchange_value, dest, compare_value);
+}
+
+inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
+  return (*os::atomic_cmpxchg_long_func)(exchange_value, dest, compare_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((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);
+}
+
+#endif // _LP64 || COMPILER2
+
+#endif // _GNU_SOURCE
+
+#endif // OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP
--- a/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +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_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_INLINE_HPP
-#define OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_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; }
-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; }
-
-inline void Atomic::inc    (volatile jint*     dest) { (void)add    (1, dest); }
-inline void Atomic::inc_ptr(volatile intptr_t* dest) { (void)add_ptr(1, dest); }
-inline void Atomic::inc_ptr(volatile void*     dest) { (void)add_ptr(1, dest); }
-
-inline void Atomic::dec    (volatile jint*     dest) { (void)add    (-1, dest); }
-inline void Atomic::dec_ptr(volatile intptr_t* dest) { (void)add_ptr(-1, dest); }
-inline void Atomic::dec_ptr(volatile void*     dest) { (void)add_ptr(-1, dest); }
-
-
-#ifdef _LP64
-
-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 jlong Atomic::load(volatile jlong* src) { return *src; }
-
-#else
-
-extern "C" void _Atomic_move_long_v9(volatile jlong* src, volatile jlong* dst);
-
-inline void Atomic_move_long(volatile jlong* src, volatile jlong* dst) {
-  _Atomic_move_long_v9(src, dst);
-}
-
-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
-
-#ifdef _GNU_SOURCE
-
-inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
-  intptr_t rv;
-  __asm__ volatile(
-    "1: \n\t"
-    " ld     [%2], %%o2\n\t"
-    " add    %1, %%o2, %%o3\n\t"
-    " cas    [%2], %%o2, %%o3\n\t"
-    " cmp    %%o2, %%o3\n\t"
-    " bne    1b\n\t"
-    "  nop\n\t"
-    " add    %1, %%o2, %0\n\t"
-    : "=r" (rv)
-    : "r" (add_value), "r" (dest)
-    : "memory", "o2", "o3");
-  return rv;
-}
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-  intptr_t rv;
-#ifdef _LP64
-  __asm__ volatile(
-    "1: \n\t"
-    " ldx    [%2], %%o2\n\t"
-    " add    %0, %%o2, %%o3\n\t"
-    " casx   [%2], %%o2, %%o3\n\t"
-    " cmp    %%o2, %%o3\n\t"
-    " bne    %%xcc, 1b\n\t"
-    "  nop\n\t"
-    " add    %0, %%o2, %0\n\t"
-    : "=r" (rv)
-    : "r" (add_value), "r" (dest)
-    : "memory", "o2", "o3");
-#else //_LP64
-  __asm__ volatile(
-    "1: \n\t"
-    " ld     [%2], %%o2\n\t"
-    " add    %1, %%o2, %%o3\n\t"
-    " cas    [%2], %%o2, %%o3\n\t"
-    " cmp    %%o2, %%o3\n\t"
-    " bne    1b\n\t"
-    "  nop\n\t"
-    " add    %1, %%o2, %0\n\t"
-    : "=r" (rv)
-    : "r" (add_value), "r" (dest)
-    : "memory", "o2", "o3");
-#endif // _LP64
-  return rv;
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)add_ptr((intptr_t)add_value, (volatile intptr_t*)dest);
-}
-
-
-inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
-  intptr_t rv = exchange_value;
-  __asm__ volatile(
-    " swap   [%2],%1\n\t"
-    : "=r" (rv)
-    : "0" (exchange_value) /* we use same register as for return value */, "r" (dest)
-    : "memory");
-  return rv;
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-  intptr_t rv = exchange_value;
-#ifdef _LP64
-  __asm__ volatile(
-    "1:\n\t"
-    " mov    %1, %%o3\n\t"
-    " ldx    [%2], %%o2\n\t"
-    " casx   [%2], %%o2, %%o3\n\t"
-    " cmp    %%o2, %%o3\n\t"
-    " bne    %%xcc, 1b\n\t"
-    "  nop\n\t"
-    " mov    %%o2, %0\n\t"
-    : "=r" (rv)
-    : "r" (exchange_value), "r" (dest)
-    : "memory", "o2", "o3");
-#else  //_LP64
-  __asm__ volatile(
-    "swap    [%2],%1\n\t"
-    : "=r" (rv)
-    : "0" (exchange_value) /* we use same register as for return value */, "r" (dest)
-    : "memory");
-#endif // _LP64
-  return rv;
-}
-
-inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
-  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
-}
-
-
-inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
-  jint rv;
-  __asm__ volatile(
-    " cas    [%2], %3, %0"
-    : "=r" (rv)
-    : "0" (exchange_value), "r" (dest), "r" (compare_value)
-    : "memory");
-  return rv;
-}
-
-inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
-#ifdef _LP64
-  jlong rv;
-  __asm__ volatile(
-    " casx   [%2], %3, %0"
-    : "=r" (rv)
-    : "0" (exchange_value), "r" (dest), "r" (compare_value)
-    : "memory");
-  return rv;
-#else  //_LP64
-  volatile jlong_accessor evl, cvl, rv;
-  evl.long_value = exchange_value;
-  cvl.long_value = compare_value;
-
-  __asm__ volatile(
-    " sllx   %2, 32, %2\n\t"
-    " srl    %3, 0,  %3\n\t"
-    " or     %2, %3, %2\n\t"
-    " sllx   %5, 32, %5\n\t"
-    " srl    %6, 0,  %6\n\t"
-    " or     %5, %6, %5\n\t"
-    " casx   [%4], %5, %2\n\t"
-    " srl    %2, 0, %1\n\t"
-    " srlx   %2, 32, %0\n\t"
-    : "=r" (rv.words[0]), "=r" (rv.words[1])
-    : "r"  (evl.words[0]), "r" (evl.words[1]), "r" (dest), "r" (cvl.words[0]), "r" (cvl.words[1])
-    : "memory");
-
-  return rv.long_value;
-#endif  //_LP64
-}
-
-inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, cmpxchg_memory_order order) {
-  intptr_t rv;
-#ifdef _LP64
-  __asm__ volatile(
-    " casx    [%2], %3, %0"
-    : "=r" (rv)
-    : "0" (exchange_value), "r" (dest), "r" (compare_value)
-    : "memory");
-#else  //_LP64
-  __asm__ volatile(
-    " cas     [%2], %3, %0"
-    : "=r" (rv)
-    : "0" (exchange_value), "r" (dest), "r" (compare_value)
-    : "memory");
-#endif // _LP64
-  return rv;
-}
-
-inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value, cmpxchg_memory_order order) {
-  return (void*)cmpxchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest, (intptr_t)compare_value, order);
-}
-
-#else // _GNU_SOURCE
-
-#if defined(COMPILER2) || defined(_LP64)
-
-// This is the interface to the atomic instructions in solaris_sparc.il.
-// It's very messy because we need to support v8 and these instructions
-// are illegal there.  When sparc v8 is dropped, we can drop out lots of
-// this code.  Also compiler2 does not support v8 so the conditional code
-// omits the instruction set check.
-
-extern "C" jint     _Atomic_swap32(jint     exchange_value, volatile jint*     dest);
-extern "C" intptr_t _Atomic_swap64(intptr_t exchange_value, volatile intptr_t* dest);
-
-extern "C" jint     _Atomic_cas32(jint     exchange_value, volatile jint*     dest, jint     compare_value);
-extern "C" intptr_t _Atomic_cas64(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value);
-extern "C" jlong    _Atomic_casl (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value);
-
-extern "C" jint     _Atomic_add32(jint     inc,       volatile jint*     dest);
-extern "C" intptr_t _Atomic_add64(intptr_t add_value, volatile intptr_t* dest);
-
-
-inline jint     Atomic::add     (jint    add_value, volatile jint*     dest) {
-  return _Atomic_add32(add_value, dest);
-}
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-#ifdef _LP64
-  return _Atomic_add64(add_value, dest);
-#else  //_LP64
-  return _Atomic_add32(add_value, dest);
-#endif // _LP64
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)add_ptr((intptr_t)add_value, (volatile intptr_t*)dest);
-}
-
-
-inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
-  return _Atomic_swap32(exchange_value, dest);
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-#ifdef _LP64
-  return _Atomic_swap64(exchange_value, dest);
-#else  // _LP64
-  return _Atomic_swap32(exchange_value, dest);
-#endif // _LP64
-}
-
-inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
-  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
-}
-
-
-inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
-  return _Atomic_cas32(exchange_value, dest, compare_value);
-}
-
-inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
-#ifdef _LP64
-  // Return 64 bit value in %o0
-  return _Atomic_cas64((intptr_t)exchange_value, (intptr_t *)dest, (intptr_t)compare_value);
-#else  // _LP64
-  // Return 64 bit value in %o0,%o1 by hand
-  return _Atomic_casl(exchange_value, dest, compare_value);
-#endif // _LP64
-}
-
-inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, cmpxchg_memory_order order) {
-#ifdef _LP64
-  return _Atomic_cas64(exchange_value, dest, compare_value);
-#else  // _LP64
-  return _Atomic_cas32(exchange_value, dest, compare_value);
-#endif // _LP64
-}
-
-inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value, cmpxchg_memory_order order) {
-  return (void*)cmpxchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest, (intptr_t)compare_value, order);
-}
-
-
-#else // _LP64 || COMPILER2
-
-
-// 32-bit compiler1 only
-
-inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
-  return (*os::atomic_add_func)(add_value, dest);
-}
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-  return (intptr_t)add((jint)add_value, (volatile jint*)dest);
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)add((jint)add_value, (volatile jint*)dest);
-}
-
-
-inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
-  return (*os::atomic_xchg_func)(exchange_value, 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);
-}
-
-inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
-  return (void*)xchg((jint)exchange_value, (volatile jint*)dest);
-}
-
-
-inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
-  return (*os::atomic_cmpxchg_func)(exchange_value, dest, compare_value);
-}
-
-inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
-  return (*os::atomic_cmpxchg_long_func)(exchange_value, dest, compare_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((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);
-}
-
-#endif // _LP64 || COMPILER2
-
-#endif // _GNU_SOURCE
-
-#endif // OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_INLINE_HPP
--- a/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,278 @@
+/*
+ * 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
+ * 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_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP
+#define OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP
+
+#include "runtime/os.hpp"
+
+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; }
+
+inline void Atomic::inc    (volatile jint*     dest) { (void)add    (1, dest); }
+inline void Atomic::inc_ptr(volatile intptr_t* dest) { (void)add_ptr(1, dest); }
+inline void Atomic::inc_ptr(volatile void*     dest) { (void)add_ptr(1, dest); }
+
+inline void Atomic::dec    (volatile jint*     dest) { (void)add    (-1, dest); }
+inline void Atomic::dec_ptr(volatile intptr_t* dest) { (void)add_ptr(-1, dest); }
+inline void Atomic::dec_ptr(volatile void*     dest) { (void)add_ptr(-1, dest); }
+
+// For Sun Studio - implementation is in solaris_x86_[32/64].il.
+// For gcc - implementation is just below.
+
+// The lock prefix can be omitted for certain instructions on uniprocessors; to
+// facilitate this, os::is_MP() is passed as an additional argument.  64-bit
+// processors are assumed to be multi-threaded and/or multi-core, so the extra
+// argument is unnecessary.
+#ifndef _LP64
+#define IS_MP_DECL() , int is_mp
+#define IS_MP_ARG()  , (int) os::is_MP()
+#else
+#define IS_MP_DECL()
+#define IS_MP_ARG()
+#endif // _LP64
+
+extern "C" {
+  jint _Atomic_add(jint add_value, volatile jint* dest IS_MP_DECL());
+  jint _Atomic_xchg(jint exchange_value, volatile jint* dest);
+  jbyte _Atomic_cmpxchg_byte(jbyte exchange_value, volatile jbyte* dest,
+                       jbyte compare_value IS_MP_DECL());
+  jint _Atomic_cmpxchg(jint exchange_value, volatile jint* dest,
+                       jint compare_value IS_MP_DECL());
+  jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest,
+                             jlong compare_value IS_MP_DECL());
+}
+
+inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
+  return _Atomic_add(add_value, dest IS_MP_ARG());
+}
+
+inline jint     Atomic::xchg       (jint     exchange_value, volatile jint*     dest) {
+  return _Atomic_xchg(exchange_value, dest);
+}
+
+#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
+inline jbyte    Atomic::cmpxchg    (jbyte    exchange_value, volatile jbyte*    dest, jbyte    compare_value, cmpxchg_memory_order order) {
+  return _Atomic_cmpxchg_byte(exchange_value, dest, compare_value IS_MP_ARG());
+}
+
+inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
+  return _Atomic_cmpxchg(exchange_value, dest, compare_value IS_MP_ARG());
+}
+
+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 IS_MP_ARG());
+}
+
+
+#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; }
+extern "C" jlong _Atomic_add_long(jlong add_value, volatile jlong* dest);
+extern "C" jlong _Atomic_xchg_long(jlong exchange_value, volatile jlong* dest);
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+  return (intptr_t)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest);
+}
+
+inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
+  return (void*)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest);
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
+  return (intptr_t)_Atomic_xchg_long((jlong)exchange_value, (volatile jlong*)dest);
+}
+
+inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
+  return (void*)_Atomic_xchg_long((jlong)exchange_value, (volatile jlong*)dest);
+}
+
+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)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value);
+}
+
+inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value, cmpxchg_memory_order order) {
+  return (void*)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value);
+}
+
+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)add((jint)add_value, (volatile jint*)dest);
+}
+
+inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
+  return (void*)add((jint)add_value, (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);
+}
+
+inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
+  return (void*)xchg((jint)exchange_value, (volatile jint*)dest);
+}
+
+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);
+}
+
+extern "C" void _Atomic_move_long(volatile jlong* src, volatile jlong* dst);
+
+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
+
+#ifdef _GNU_SOURCE
+// Add a lock prefix to an instruction on an MP machine
+#define LOCK_IF_MP(mp) "cmp $0, " #mp "; je 1f; lock; 1: "
+
+extern "C" {
+  inline jint _Atomic_add(jint add_value, volatile jint* dest, int mp) {
+    jint addend = add_value;
+    __asm__ volatile (  LOCK_IF_MP(%3) "xaddl %0,(%2)"
+                    : "=r" (addend)
+                    : "0" (addend), "r" (dest), "r" (mp)
+                    : "cc", "memory");
+    return addend + add_value;
+  }
+
+#ifdef AMD64
+  inline jlong _Atomic_add_long(jlong add_value, volatile jlong* dest, int mp) {
+    intptr_t addend = add_value;
+    __asm__ __volatile__ (LOCK_IF_MP(%3) "xaddq %0,(%2)"
+                        : "=r" (addend)
+                        : "0" (addend), "r" (dest), "r" (mp)
+                        : "cc", "memory");
+    return addend + add_value;
+  }
+
+  inline jlong _Atomic_xchg_long(jlong exchange_value, volatile jlong* dest) {
+    __asm__ __volatile__ ("xchgq (%2),%0"
+                        : "=r" (exchange_value)
+                        : "0" (exchange_value), "r" (dest)
+                        : "memory");
+    return exchange_value;
+  }
+
+#endif // AMD64
+
+  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 jint _Atomic_cmpxchg(jint exchange_value, volatile jint* dest, jint compare_value, int 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;
+  }
+
+
+  inline jbyte _Atomic_cmpxchg_byte(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, int 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;
+  }
+
+  // This is the interface to the atomic instruction in solaris_i486.s.
+  jlong _Atomic_cmpxchg_long_gcc(jlong exchange_value, volatile jlong* dest, jlong compare_value, int mp);
+
+  inline jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest, jlong compare_value, int mp) {
+#ifdef AMD64
+    __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;
+#else
+    return _Atomic_cmpxchg_long_gcc(exchange_value, dest, compare_value, os::is_MP());
+
+    #if 0
+    // The code below does not work presumably because of the bug in gcc
+    // The error message says:
+    //   can't find a register in class BREG while reloading asm
+    // However I want to save this code and later replace _Atomic_cmpxchg_long_gcc
+    // with such inline asm code:
+
+    volatile jlong_accessor evl, cvl, rv;
+    evl.long_value = exchange_value;
+    cvl.long_value = compare_value;
+    int mp = os::is_MP();
+
+    __asm__ volatile ("cmp $0, %%esi\n\t"
+       "je 1f \n\t"
+       "lock\n\t"
+       "1: cmpxchg8b (%%edi)\n\t"
+       : "=a"(cvl.words[0]),   "=d"(cvl.words[1])
+       : "a"(cvl.words[0]), "d"(cvl.words[1]),
+         "b"(evl.words[0]), "c"(evl.words[1]),
+         "D"(dest), "S"(mp)
+       :  "cc", "memory");
+    return cvl.long_value;
+    #endif // if 0
+#endif // AMD64
+  }
+}
+#undef LOCK_IF_MP
+
+#endif // _GNU_SOURCE
+
+#endif // OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP
--- a/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,279 +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_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
-#define OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
-
-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; }
-
-inline void Atomic::inc    (volatile jint*     dest) { (void)add    (1, dest); }
-inline void Atomic::inc_ptr(volatile intptr_t* dest) { (void)add_ptr(1, dest); }
-inline void Atomic::inc_ptr(volatile void*     dest) { (void)add_ptr(1, dest); }
-
-inline void Atomic::dec    (volatile jint*     dest) { (void)add    (-1, dest); }
-inline void Atomic::dec_ptr(volatile intptr_t* dest) { (void)add_ptr(-1, dest); }
-inline void Atomic::dec_ptr(volatile void*     dest) { (void)add_ptr(-1, dest); }
-
-// For Sun Studio - implementation is in solaris_x86_[32/64].il.
-// For gcc - implementation is just below.
-
-// The lock prefix can be omitted for certain instructions on uniprocessors; to
-// facilitate this, os::is_MP() is passed as an additional argument.  64-bit
-// processors are assumed to be multi-threaded and/or multi-core, so the extra
-// argument is unnecessary.
-#ifndef _LP64
-#define IS_MP_DECL() , int is_mp
-#define IS_MP_ARG()  , (int) os::is_MP()
-#else
-#define IS_MP_DECL()
-#define IS_MP_ARG()
-#endif // _LP64
-
-extern "C" {
-  jint _Atomic_add(jint add_value, volatile jint* dest IS_MP_DECL());
-  jint _Atomic_xchg(jint exchange_value, volatile jint* dest);
-  jbyte _Atomic_cmpxchg_byte(jbyte exchange_value, volatile jbyte* dest,
-                       jbyte compare_value IS_MP_DECL());
-  jint _Atomic_cmpxchg(jint exchange_value, volatile jint* dest,
-                       jint compare_value IS_MP_DECL());
-  jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest,
-                             jlong compare_value IS_MP_DECL());
-}
-
-inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
-  return _Atomic_add(add_value, dest IS_MP_ARG());
-}
-
-inline jint     Atomic::xchg       (jint     exchange_value, volatile jint*     dest) {
-  return _Atomic_xchg(exchange_value, dest);
-}
-
-#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-inline jbyte    Atomic::cmpxchg    (jbyte    exchange_value, volatile jbyte*    dest, jbyte    compare_value, cmpxchg_memory_order order) {
-  return _Atomic_cmpxchg_byte(exchange_value, dest, compare_value IS_MP_ARG());
-}
-
-inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
-  return _Atomic_cmpxchg(exchange_value, dest, compare_value IS_MP_ARG());
-}
-
-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 IS_MP_ARG());
-}
-
-
-#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; }
-extern "C" jlong _Atomic_add_long(jlong add_value, volatile jlong* dest);
-extern "C" jlong _Atomic_xchg_long(jlong exchange_value, volatile jlong* dest);
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-  return (intptr_t)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest);
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest);
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-  return (intptr_t)_Atomic_xchg_long((jlong)exchange_value, (volatile jlong*)dest);
-}
-
-inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
-  return (void*)_Atomic_xchg_long((jlong)exchange_value, (volatile jlong*)dest);
-}
-
-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)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value);
-}
-
-inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value, cmpxchg_memory_order order) {
-  return (void*)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value);
-}
-
-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)add((jint)add_value, (volatile jint*)dest);
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)add((jint)add_value, (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);
-}
-
-inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
-  return (void*)xchg((jint)exchange_value, (volatile jint*)dest);
-}
-
-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);
-}
-
-extern "C" void _Atomic_move_long(volatile jlong* src, volatile jlong* dst);
-
-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
-
-#ifdef _GNU_SOURCE
-// Add a lock prefix to an instruction on an MP machine
-#define LOCK_IF_MP(mp) "cmp $0, " #mp "; je 1f; lock; 1: "
-
-extern "C" {
-  inline jint _Atomic_add(jint add_value, volatile jint* dest, int mp) {
-    jint addend = add_value;
-    __asm__ volatile (  LOCK_IF_MP(%3) "xaddl %0,(%2)"
-                    : "=r" (addend)
-                    : "0" (addend), "r" (dest), "r" (mp)
-                    : "cc", "memory");
-    return addend + add_value;
-  }
-
-#ifdef AMD64
-  inline jlong _Atomic_add_long(jlong add_value, volatile jlong* dest, int mp) {
-    intptr_t addend = add_value;
-    __asm__ __volatile__ (LOCK_IF_MP(%3) "xaddq %0,(%2)"
-                        : "=r" (addend)
-                        : "0" (addend), "r" (dest), "r" (mp)
-                        : "cc", "memory");
-    return addend + add_value;
-  }
-
-  inline jlong _Atomic_xchg_long(jlong exchange_value, volatile jlong* dest) {
-    __asm__ __volatile__ ("xchgq (%2),%0"
-                        : "=r" (exchange_value)
-                        : "0" (exchange_value), "r" (dest)
-                        : "memory");
-    return exchange_value;
-  }
-
-#endif // AMD64
-
-  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 jint _Atomic_cmpxchg(jint exchange_value, volatile jint* dest, jint compare_value, int 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;
-  }
-
-
-  inline jbyte _Atomic_cmpxchg_byte(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value, int 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;
-  }
-
-  // This is the interface to the atomic instruction in solaris_i486.s.
-  jlong _Atomic_cmpxchg_long_gcc(jlong exchange_value, volatile jlong* dest, jlong compare_value, int mp);
-
-  inline jlong _Atomic_cmpxchg_long(jlong exchange_value, volatile jlong* dest, jlong compare_value, int mp) {
-#ifdef AMD64
-    __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;
-#else
-    return _Atomic_cmpxchg_long_gcc(exchange_value, dest, compare_value, os::is_MP());
-
-    #if 0
-    // The code below does not work presumably because of the bug in gcc
-    // The error message says:
-    //   can't find a register in class BREG while reloading asm
-    // However I want to save this code and later replace _Atomic_cmpxchg_long_gcc
-    // with such inline asm code:
-
-    volatile jlong_accessor evl, cvl, rv;
-    evl.long_value = exchange_value;
-    cvl.long_value = compare_value;
-    int mp = os::is_MP();
-
-    __asm__ volatile ("cmp $0, %%esi\n\t"
-       "je 1f \n\t"
-       "lock\n\t"
-       "1: cmpxchg8b (%%edi)\n\t"
-       : "=a"(cvl.words[0]),   "=d"(cvl.words[1])
-       : "a"(cvl.words[0]), "d"(cvl.words[1]),
-         "b"(evl.words[0]), "c"(evl.words[1]),
-         "D"(dest), "S"(mp)
-       :  "cc", "memory");
-    return cvl.long_value;
-    #endif // if 0
-#endif // AMD64
-  }
-}
-#undef LOCK_IF_MP
-
-#endif // _GNU_SOURCE
-
-#endif // OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
--- a/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
   }
--- a/src/os_cpu/solaris_x86/vm/thread_solaris_x86.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/solaris_x86/vm/thread_solaris_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/os_cpu/windows_x86/vm/atomic_windows_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,303 @@
+/*
+ * 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
+ * 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_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP
+#define OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP
+
+#include "runtime/os.hpp"
+
+// The following alternative implementations are needed because
+// Windows 95 doesn't support (some of) the corresponding Windows NT
+// calls. Furthermore, these versions allow inlining in the caller.
+// (More precisely: The documentation for InterlockedExchange says
+// it is supported for Windows 95. However, when single-stepping
+// through the assembly code we cannot step into the routine and
+// when looking at the routine address we see only garbage code.
+// Better safe then sorry!). Was bug 7/31/98 (gri).
+//
+// Performance note: On uniprocessors, the 'lock' prefixes are not
+// necessary (and expensive). We should generate separate cases if
+// this becomes a performance problem.
+
+#pragma warning(disable: 4035) // Disables warnings reporting missing return statement
+
+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
+// VC++ doesn't like the lock prefix to be on a single line
+// so we can't insert a label after the lock prefix.
+// By emitting a lock prefix, we can define a label after it.
+#define LOCK_IF_MP(mp) __asm cmp mp, 0  \
+                       __asm je L0      \
+                       __asm _emit 0xF0 \
+                       __asm L0:
+
+#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 jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
+  return (jint)(*os::atomic_add_func)(add_value, dest);
+}
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+  return (intptr_t)(*os::atomic_add_ptr_func)(add_value, dest);
+}
+
+inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
+  return (void*)(*os::atomic_add_ptr_func)(add_value, (volatile intptr_t*)dest);
+}
+
+inline void Atomic::inc    (volatile jint*     dest) {
+  (void)add    (1, dest);
+}
+
+inline void Atomic::inc_ptr(volatile intptr_t* dest) {
+  (void)add_ptr(1, dest);
+}
+
+inline void Atomic::inc_ptr(volatile void*     dest) {
+  (void)add_ptr(1, dest);
+}
+
+inline void Atomic::dec    (volatile jint*     dest) {
+  (void)add    (-1, dest);
+}
+
+inline void Atomic::dec_ptr(volatile intptr_t* dest) {
+  (void)add_ptr(-1, dest);
+}
+
+inline void Atomic::dec_ptr(volatile void*     dest) {
+  (void)add_ptr(-1, dest);
+}
+
+inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
+  return (jint)(*os::atomic_xchg_func)(exchange_value, dest);
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
+  return (intptr_t)(os::atomic_xchg_ptr_func)(exchange_value, dest);
+}
+
+inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
+  return (void *)(os::atomic_xchg_ptr_func)((intptr_t)exchange_value, (volatile intptr_t*)dest);
+}
+
+inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
+  return (*os::atomic_cmpxchg_func)(exchange_value, dest, compare_value);
+}
+
+#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
+inline jbyte    Atomic::cmpxchg    (jbyte    exchange_value, volatile jbyte*    dest, jbyte    compare_value, cmpxchg_memory_order order) {
+    return (*os::atomic_cmpxchg_byte_func)(exchange_value, dest, compare_value);
+}
+
+inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
+  return (*os::atomic_cmpxchg_long_func)(exchange_value, dest, compare_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 jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
+  int mp = os::is_MP();
+  __asm {
+    mov edx, dest;
+    mov eax, add_value;
+    mov ecx, eax;
+    LOCK_IF_MP(mp)
+    xadd dword ptr [edx], eax;
+    add eax, ecx;
+  }
+}
+
+inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
+  return (intptr_t)add((jint)add_value, (volatile jint*)dest);
+}
+
+inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
+  return (void*)add((jint)add_value, (volatile jint*)dest);
+}
+
+inline void Atomic::inc    (volatile jint*     dest) {
+  // alternative for InterlockedIncrement
+  int mp = os::is_MP();
+  __asm {
+    mov edx, dest;
+    LOCK_IF_MP(mp)
+    add dword ptr [edx], 1;
+  }
+}
+
+inline void Atomic::inc_ptr(volatile intptr_t* dest) {
+  inc((volatile jint*)dest);
+}
+
+inline void Atomic::inc_ptr(volatile void*     dest) {
+  inc((volatile jint*)dest);
+}
+
+inline void Atomic::dec    (volatile jint*     dest) {
+  // alternative for InterlockedDecrement
+  int mp = os::is_MP();
+  __asm {
+    mov edx, dest;
+    LOCK_IF_MP(mp)
+    sub dword ptr [edx], 1;
+  }
+}
+
+inline void Atomic::dec_ptr(volatile intptr_t* dest) {
+  dec((volatile jint*)dest);
+}
+
+inline void Atomic::dec_ptr(volatile void*     dest) {
+  dec((volatile jint*)dest);
+}
+
+inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
+  // alternative for InterlockedExchange
+  __asm {
+    mov eax, exchange_value;
+    mov ecx, dest;
+    xchg eax, dword ptr [ecx];
+  }
+}
+
+inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
+  return (intptr_t)xchg((jint)exchange_value, (volatile jint*)dest);
+}
+
+inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
+  return (void*)xchg((jint)exchange_value, (volatile jint*)dest);
+}
+
+#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
+inline jbyte    Atomic::cmpxchg    (jbyte    exchange_value, volatile jbyte*    dest, jbyte    compare_value, cmpxchg_memory_order order) {
+  // alternative for InterlockedCompareExchange
+  int mp = os::is_MP();
+  __asm {
+    mov edx, dest
+    mov cl, exchange_value
+    mov al, compare_value
+    LOCK_IF_MP(mp)
+    cmpxchg byte ptr [edx], cl
+  }
+}
+
+inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
+  // alternative for InterlockedCompareExchange
+  int mp = os::is_MP();
+  __asm {
+    mov edx, dest
+    mov ecx, exchange_value
+    mov eax, compare_value
+    LOCK_IF_MP(mp)
+    cmpxchg dword ptr [edx], ecx
+  }
+}
+
+inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
+  int mp = os::is_MP();
+  jint ex_lo  = (jint)exchange_value;
+  jint ex_hi  = *( ((jint*)&exchange_value) + 1 );
+  jint cmp_lo = (jint)compare_value;
+  jint cmp_hi = *( ((jint*)&compare_value) + 1 );
+  __asm {
+    push ebx
+    push edi
+    mov eax, cmp_lo
+    mov edx, cmp_hi
+    mov edi, dest
+    mov ebx, ex_lo
+    mov ecx, ex_hi
+    LOCK_IF_MP(mp)
+    cmpxchg8b qword ptr [edi]
+    pop edi
+    pop ebx
+  }
+}
+
+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;
+  volatile jlong* pdest = &dest;
+  __asm {
+    mov eax, src
+    fild     qword ptr [eax]
+    mov eax, pdest
+    fistp    qword ptr [eax]
+  }
+  return dest;
+}
+
+inline void Atomic::store(jlong store_value, volatile jlong* dest) {
+  volatile jlong* src = &store_value;
+  __asm {
+    mov eax, src
+    fild     qword ptr [eax]
+    mov eax, dest
+    fistp    qword ptr [eax]
+  }
+}
+
+inline void Atomic::store(jlong store_value, jlong* dest) {
+  Atomic::store(store_value, (volatile jlong*)dest);
+}
+
+#endif // AMD64
+
+#pragma warning(default: 4035) // Enables warnings reporting missing return statement
+
+#endif // OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP
--- a/src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +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_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
-#define OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
-
-// The following alternative implementations are needed because
-// Windows 95 doesn't support (some of) the corresponding Windows NT
-// calls. Furthermore, these versions allow inlining in the caller.
-// (More precisely: The documentation for InterlockedExchange says
-// it is supported for Windows 95. However, when single-stepping
-// through the assembly code we cannot step into the routine and
-// when looking at the routine address we see only garbage code.
-// Better safe then sorry!). Was bug 7/31/98 (gri).
-//
-// Performance note: On uniprocessors, the 'lock' prefixes are not
-// necessary (and expensive). We should generate separate cases if
-// this becomes a performance problem.
-
-#pragma warning(disable: 4035) // Disables warnings reporting missing return statement
-
-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
-// VC++ doesn't like the lock prefix to be on a single line
-// so we can't insert a label after the lock prefix.
-// By emitting a lock prefix, we can define a label after it.
-#define LOCK_IF_MP(mp) __asm cmp mp, 0  \
-                       __asm je L0      \
-                       __asm _emit 0xF0 \
-                       __asm L0:
-
-#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 jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
-  return (jint)(*os::atomic_add_func)(add_value, dest);
-}
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-  return (intptr_t)(*os::atomic_add_ptr_func)(add_value, dest);
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)(*os::atomic_add_ptr_func)(add_value, (volatile intptr_t*)dest);
-}
-
-inline void Atomic::inc    (volatile jint*     dest) {
-  (void)add    (1, dest);
-}
-
-inline void Atomic::inc_ptr(volatile intptr_t* dest) {
-  (void)add_ptr(1, dest);
-}
-
-inline void Atomic::inc_ptr(volatile void*     dest) {
-  (void)add_ptr(1, dest);
-}
-
-inline void Atomic::dec    (volatile jint*     dest) {
-  (void)add    (-1, dest);
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest) {
-  (void)add_ptr(-1, dest);
-}
-
-inline void Atomic::dec_ptr(volatile void*     dest) {
-  (void)add_ptr(-1, dest);
-}
-
-inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
-  return (jint)(*os::atomic_xchg_func)(exchange_value, dest);
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-  return (intptr_t)(os::atomic_xchg_ptr_func)(exchange_value, dest);
-}
-
-inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
-  return (void *)(os::atomic_xchg_ptr_func)((intptr_t)exchange_value, (volatile intptr_t*)dest);
-}
-
-inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
-  return (*os::atomic_cmpxchg_func)(exchange_value, dest, compare_value);
-}
-
-#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-inline jbyte    Atomic::cmpxchg    (jbyte    exchange_value, volatile jbyte*    dest, jbyte    compare_value, cmpxchg_memory_order order) {
-    return (*os::atomic_cmpxchg_byte_func)(exchange_value, dest, compare_value);
-}
-
-inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
-  return (*os::atomic_cmpxchg_long_func)(exchange_value, dest, compare_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 jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
-  int mp = os::is_MP();
-  __asm {
-    mov edx, dest;
-    mov eax, add_value;
-    mov ecx, eax;
-    LOCK_IF_MP(mp)
-    xadd dword ptr [edx], eax;
-    add eax, ecx;
-  }
-}
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-  return (intptr_t)add((jint)add_value, (volatile jint*)dest);
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)add((jint)add_value, (volatile jint*)dest);
-}
-
-inline void Atomic::inc    (volatile jint*     dest) {
-  // alternative for InterlockedIncrement
-  int mp = os::is_MP();
-  __asm {
-    mov edx, dest;
-    LOCK_IF_MP(mp)
-    add dword ptr [edx], 1;
-  }
-}
-
-inline void Atomic::inc_ptr(volatile intptr_t* dest) {
-  inc((volatile jint*)dest);
-}
-
-inline void Atomic::inc_ptr(volatile void*     dest) {
-  inc((volatile jint*)dest);
-}
-
-inline void Atomic::dec    (volatile jint*     dest) {
-  // alternative for InterlockedDecrement
-  int mp = os::is_MP();
-  __asm {
-    mov edx, dest;
-    LOCK_IF_MP(mp)
-    sub dword ptr [edx], 1;
-  }
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest) {
-  dec((volatile jint*)dest);
-}
-
-inline void Atomic::dec_ptr(volatile void*     dest) {
-  dec((volatile jint*)dest);
-}
-
-inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
-  // alternative for InterlockedExchange
-  __asm {
-    mov eax, exchange_value;
-    mov ecx, dest;
-    xchg eax, dword ptr [ecx];
-  }
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-  return (intptr_t)xchg((jint)exchange_value, (volatile jint*)dest);
-}
-
-inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
-  return (void*)xchg((jint)exchange_value, (volatile jint*)dest);
-}
-
-#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-inline jbyte    Atomic::cmpxchg    (jbyte    exchange_value, volatile jbyte*    dest, jbyte    compare_value, cmpxchg_memory_order order) {
-  // alternative for InterlockedCompareExchange
-  int mp = os::is_MP();
-  __asm {
-    mov edx, dest
-    mov cl, exchange_value
-    mov al, compare_value
-    LOCK_IF_MP(mp)
-    cmpxchg byte ptr [edx], cl
-  }
-}
-
-inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
-  // alternative for InterlockedCompareExchange
-  int mp = os::is_MP();
-  __asm {
-    mov edx, dest
-    mov ecx, exchange_value
-    mov eax, compare_value
-    LOCK_IF_MP(mp)
-    cmpxchg dword ptr [edx], ecx
-  }
-}
-
-inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
-  int mp = os::is_MP();
-  jint ex_lo  = (jint)exchange_value;
-  jint ex_hi  = *( ((jint*)&exchange_value) + 1 );
-  jint cmp_lo = (jint)compare_value;
-  jint cmp_hi = *( ((jint*)&compare_value) + 1 );
-  __asm {
-    push ebx
-    push edi
-    mov eax, cmp_lo
-    mov edx, cmp_hi
-    mov edi, dest
-    mov ebx, ex_lo
-    mov ecx, ex_hi
-    LOCK_IF_MP(mp)
-    cmpxchg8b qword ptr [edi]
-    pop edi
-    pop ebx
-  }
-}
-
-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;
-  volatile jlong* pdest = &dest;
-  __asm {
-    mov eax, src
-    fild     qword ptr [eax]
-    mov eax, pdest
-    fistp    qword ptr [eax]
-  }
-  return dest;
-}
-
-inline void Atomic::store(jlong store_value, volatile jlong* dest) {
-  volatile jlong* src = &store_value;
-  __asm {
-    mov eax, src
-    fild     qword ptr [eax]
-    mov eax, dest
-    fistp    qword ptr [eax]
-  }
-}
-
-inline void Atomic::store(jlong store_value, jlong* dest) {
-  Atomic::store(store_value, (volatile jlong*)dest);
-}
-
-#endif // AMD64
-
-#pragma warning(default: 4035) // Enables warnings reporting missing return statement
-
-#endif // OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
--- a/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/os_cpu/windows_x86/vm/thread_windows_x86.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/windows_x86/vm/thread_windows_x86.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
   }
--- a/src/os_cpu/windows_x86/vm/thread_windows_x86.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/os_cpu/windows_x86/vm/thread_windows_x86.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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:
--- a/src/share/vm/asm/assembler.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/asm/assembler.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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());
--- a/src/share/vm/c1/c1_Runtime1.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/c1/c1_Runtime1.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/ci/ciEnv.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/ci/ciEnv.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
   }
 }
--- a/src/share/vm/ci/ciMethod.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/ci/ciMethod.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/share/vm/ci/ciMethod.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/ci/ciMethod.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
 };
 
--- a/src/share/vm/classfile/classFileParser.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/classfile/classFileParser.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -5844,6 +5844,7 @@
                                                     _super_klass,
                                                     _methods,
                                                     _access_flags,
+                                                    _major_version,
                                                     _loader_data->class_loader(),
                                                     _class_name,
                                                     _local_interfaces,
--- a/src/share/vm/classfile/classLoaderData.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/classfile/classLoaderData.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/classfile/klassFactory.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/classfile/klassFactory.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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,
--- a/src/share/vm/classfile/stringTable.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/classfile/stringTable.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/classfile/symbolTable.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/classfile/symbolTable.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/share/vm/classfile/systemDictionary.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/classfile/systemDictionary.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -1641,7 +1641,6 @@
       JvmtiExport::post_class_load((JavaThread *) THREAD, k());
 
   }
-  TRACE_KLASS_DEFINITION(k, THREAD);
   class_define_event(k);
 }
 
--- a/src/share/vm/code/nmethod.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/code/nmethod.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/compiler/compileBroker.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/compiler/compileBroker.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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 @@
     }
   }
 }
-
--- a/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/cms/parNewGeneration.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/cms/parNewGeneration.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/g1/collectionSetChooser.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/collectionSetChooser.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/share/vm/gc/g1/dirtyCardQueue.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/dirtyCardQueue.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/g1/g1CardLiveData.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1CardLiveData.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/g1/g1CollectedHeap.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1CollectedHeap.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/g1/g1EvacStats.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1EvacStats.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/share/vm/gc/g1/g1HotCardCache.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1HotCardCache.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {}
--- a/src/share/vm/gc/g1/g1MarkSweep.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1MarkSweep.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/g1/g1StringDedup.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1StringDedup.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/src/share/vm/gc/g1/g1StringDedup.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1StringDedup.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/share/vm/gc/g1/g1StringDedupQueue.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1StringDedupQueue.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/share/vm/gc/g1/g1StringDedupThread.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/g1StringDedupThread.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/src/share/vm/gc/g1/heapRegion.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/heapRegion.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/share/vm/gc/g1/heapRegion.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/heapRegion.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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,
--- a/src/share/vm/gc/g1/heapRegionRemSet.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/heapRegionRemSet.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/g1/heapRegionTracer.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/heapRegionTracer.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
   }
 }
--- a/src/share/vm/gc/g1/sparsePRT.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/g1/sparsePRT.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/share/vm/gc/parallel/gcTaskThread.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/parallel/gcTaskThread.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/parallel/mutableNUMASpace.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/parallel/mutableNUMASpace.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/src/share/vm/gc/parallel/mutableSpace.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/parallel/mutableSpace.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/parallel/parMarkBitMap.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/parallel/parMarkBitMap.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/parallel/psCompactionManager.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/parallel/psCompactionManager.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/share/vm/gc/parallel/psParallelCompact.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/parallel/psParallelCompact.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/serial/defNewGeneration.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/serial/defNewGeneration.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/shared/allocTracer.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/allocTracer.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/src/share/vm/gc/shared/cardTableRS.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/cardTableRS.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/shared/gcLocker.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/gcLocker.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/share/vm/gc/shared/gcTraceSend.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/gcTraceSend.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/share/vm/gc/shared/objectCountEventSender.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/objectCountEventSender.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/share/vm/gc/shared/plab.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/plab.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/share/vm/gc/shared/space.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/space.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/shared/taskqueue.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/taskqueue.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/shared/taskqueue.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/taskqueue.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/gc/shared/workgroup.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/gc/shared/workgroup.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/interpreter/bytecodeInterpreter.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/interpreter/bytecodeInterpreter.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/interpreter/interpreterRuntime.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/interpreter/interpreterRuntime.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/jvmci/jvmciEnv.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/jvmci/jvmciEnv.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/share/vm/logging/logDecorations.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/logging/logDecorations.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
   }
--- a/src/share/vm/logging/logOutputList.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/logging/logOutputList.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/share/vm/logging/logOutputList.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/logging/logOutputList.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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:
--- a/src/share/vm/logging/logTag.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/logging/logTag.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -35,8 +35,9 @@
   LOG_TAG(add) \
   LOG_TAG(age) \
   LOG_TAG(alloc) \
+  LOG_TAG(annotation) \
   LOG_TAG(arguments) \
-  LOG_TAG(annotation) \
+  LOG_TAG(attach) \
   LOG_TAG(barrier) \
   LOG_TAG(biasedlocking) \
   LOG_TAG(bot) \
--- a/src/share/vm/memory/allocation.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/memory/allocation.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/memory/allocation.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/memory/allocation.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/memory/metaspace.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/memory/metaspace.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/memory/universe.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/memory/universe.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/src/share/vm/memory/universe.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/memory/universe.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/src/share/vm/oops/compiledICHolder.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/compiledICHolder.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/share/vm/oops/cpCache.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/cpCache.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/oops/instanceKlass.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/instanceKlass.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/oops/klass.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/klass.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/oops/klassVtable.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/klassVtable.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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())) {
+  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();
+      print();
 #endif
-    fatal("vtableEntry " PTR_FORMAT ": method is from subclass", p2i(this));
-  }
+      fatal("vtableEntry " PTR_FORMAT ": method is from subclass", p2i(this));
+    }
+ }
 }
 
 #ifndef PRODUCT
--- a/src/share/vm/oops/klassVtable.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/klassVtable.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
+
+ 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:
-  enum { VTABLE_TRANSITIVE_OVERRIDE_VERSION = 51 } ;
   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);
--- a/src/share/vm/oops/method.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/method.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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()) {
--- a/src/share/vm/oops/oop.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/oop.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/oops/symbol.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/symbol.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/src/share/vm/oops/symbol.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/oops/symbol.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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.
--- a/src/share/vm/opto/bytecodeInfo.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/opto/bytecodeInfo.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/share/vm/opto/compile.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/opto/compile.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
     }
--- a/src/share/vm/opto/runtime.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/opto/runtime.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/prims/jni.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/jni.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/prims/jvm.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/jvm.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/prims/jvmti.xml	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/jvmti.xml	Fri Sep 02 02:41:12 2016 +0000
@@ -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>
--- a/src/share/vm/prims/jvmtiEnv.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/jvmtiEnv.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/src/share/vm/prims/jvmtiImpl.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/jvmtiImpl.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/prims/jvmtiRawMonitor.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/jvmtiRawMonitor.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/prims/jvmtiRedefineClasses.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/share/vm/prims/jvmtiTagMap.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/jvmtiTagMap.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/src/share/vm/prims/unsafe.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/prims/unsafe.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/src/share/vm/runtime/atomic.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/atomic.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
+
+#include OS_CPU_HEADER(atomic)
 
-#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
+// 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
--- a/src/share/vm/runtime/atomic.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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
--- a/src/share/vm/runtime/biasedLocking.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/biasedLocking.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/runtime/globals.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/globals.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
 }
--- a/src/share/vm/runtime/globals.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/globals.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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)")                                    \
--- a/src/share/vm/runtime/handles.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/handles.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/share/vm/runtime/interfaceSupport.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/interfaceSupport.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/runtime/mutex.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/mutex.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/src/share/vm/runtime/objectMonitor.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/objectMonitor.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/share/vm/runtime/orderAccess.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/orderAccess.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/share/vm/runtime/os.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/os.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/src/share/vm/runtime/os.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/os.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/share/vm/runtime/safepoint.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/safepoint.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/share/vm/runtime/sharedRuntime.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/sharedRuntime.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/runtime/sweeper.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/sweeper.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/src/share/vm/runtime/synchronizer.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/synchronizer.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/src/share/vm/runtime/thread.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/thread.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/runtime/thread.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/thread.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
 
--- a/src/share/vm/runtime/vmThread.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/runtime/vmThread.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/src/share/vm/services/mallocTracker.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/services/mallocTracker.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/services/memTracker.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/services/memTracker.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/services/threadService.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/services/threadService.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/services/virtualMemoryTracker.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/services/virtualMemoryTracker.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/shark/sharkRuntime.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/shark/sharkRuntime.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/trace/traceDataTypes.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/trace/traceDataTypes.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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,
--- a/src/share/vm/trace/traceMacros.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/trace/traceMacros.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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)
--- a/src/share/vm/trace/traceevents.xml	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/trace/traceevents.xml	Fri Sep 02 02:41:12 2016 +0000
@@ -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>
--- a/src/share/vm/trace/tracerelationdecls.xml	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/trace/tracerelationdecls.xml	Fri Sep 02 02:41:12 2016 +0000
@@ -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>
--- a/src/share/vm/trace/tracetypes.xml	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/trace/tracetypes.xml	Fri Sep 02 02:41:12 2016 +0000
@@ -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>
--- a/src/share/vm/utilities/accessFlags.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/accessFlags.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/src/share/vm/utilities/bitMap.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/bitMap.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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() {
--- a/src/share/vm/utilities/bitMap.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/bitMap.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/src/share/vm/utilities/bitMap.inline.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/bitMap.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/src/share/vm/utilities/debug.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/debug.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/src/share/vm/utilities/globalDefinitions.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/globalDefinitions.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/src/share/vm/utilities/histogram.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/histogram.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/share/vm/utilities/macros.hpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/macros.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/src/share/vm/utilities/vmError.cpp	Thu Sep 01 23:20:10 2016 +0000
+++ b/src/share/vm/utilities/vmError.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
--- a/test/TEST.groups	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/TEST.groups	Fri Sep 02 02:41:12 2016 +0000
@@ -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 = \
--- a/test/compiler/arguments/BMISupportedCPUTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/BMISupportedCPUTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
 /**
--- a/test/compiler/arguments/BMIUnsupportedCPUTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/BMIUnsupportedCPUTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/arguments/CheckCICompilerCount.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/CheckCICompilerCount.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 = {
--- a/test/compiler/arguments/CheckCompileThresholdScaling.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/CheckCompileThresholdScaling.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/compiler/arguments/TestUseBMI1InstructionsOnSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/TestUseBMI1InstructionsOnSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/arguments/TestUseBMI1InstructionsOnUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/TestUseBMI1InstructionsOnUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/arraycopy/TestArrayCopyNoInitDeopt.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/arraycopy/TestArrayCopyNoInitDeopt.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/c2/PolynomialRoot.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/PolynomialRoot.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/c2/Test5057225.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/Test5057225.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/c2/Test6603011.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/Test6603011.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/c2/Test6800154.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/Test6800154.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/c2/Test6805724.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/Test6805724.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/c2/Test6857159.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/Test6857159.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/c2/Test7068051.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/Test7068051.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/c2/Test7177917.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/Test7177917.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/c2/cr6589834/Test_ia32.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/cr6589834/Test_ia32.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/c2/stemmer/Stemmer.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/c2/stemmer/Stemmer.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromCompiled/CompiledInvokeInterface2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeInterface2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeInterface2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeInterface2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeStatic2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeStatic2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeStatic2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeStatic2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/classUnloading/methodUnloading/TestMethodUnloading.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/classUnloading/methodUnloading/TestMethodUnloading.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/CheckReservedInitialCodeCacheSizeArgOrder.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/CheckReservedInitialCodeCacheSizeArgOrder.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/codecache/CheckSegmentedCodeCache.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/CheckSegmentedCodeCache.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/codecache/CheckUpperLimit.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/CheckUpperLimit.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/codecache/OverflowCodeCacheTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/OverflowCodeCacheTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/cli/TestSegmentedCodeCacheOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/cli/TestSegmentedCodeCacheOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/codecache/cli/codeheapsize/CodeCacheFreeSpaceRunner.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/cli/codeheapsize/CodeCacheFreeSpaceRunner.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/codecache/cli/codeheapsize/JVMStartupRunner.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/cli/codeheapsize/JVMStartupRunner.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/codecache/cli/codeheapsize/TestCodeHeapSizeOptions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/cli/codeheapsize/TestCodeHeapSizeOptions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/codecache/cli/printcodecache/PrintCodeCacheRunner.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/cli/printcodecache/PrintCodeCacheRunner.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/codecache/cli/printcodecache/TestPrintCodeCacheOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/cli/printcodecache/TestPrintCodeCacheOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/compiler/codecache/dtrace/DtraceResultsAnalyzer.java	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,29 @@
+/*
+ * 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
+ * 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 compiler.codecache.dtrace;
+
+import jdk.test.lib.process.OutputAnalyzer;
+
+public interface DtraceResultsAnalyzer {
+    public void analyze(OutputAnalyzer oa, String logFilePath);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/compiler/codecache/dtrace/DtraceRunner.java	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,121 @@
+/*
+ * 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
+ * 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 compiler.codecache.dtrace;
+
+import jdk.test.lib.Asserts;
+import jdk.test.lib.process.OutputAnalyzer;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class DtraceRunner {
+
+    private static final String DTRACE_DEFAULT_PATH = "/usr/sbin/dtrace";
+    private static final String DTRACE_PATH_PROPERTY
+            = "com.oracle.test.dtrace.path";
+    private static final String OUTPUT_FILE_DTRACE_OPTION = "o";
+    private static final String RUN_COMMAND_DTRACE_OPTION = "c";
+    private static final String RUN_SCRIPT_DTRACE_OPTION = "s";
+    private static final String ALLOW_ZERO_PROBE_DESCRIPTION_DTRACE_OPTION = "Z";
+    private static final String DTRACE_OPTION_PREFIX = "-";
+    public static final String PERMIT_DESTRUCTIVE_ACTIONS_DTRACE_OPTION = "w";
+    public static final String DTRACE_OUT_LOG = "dtrace.out";
+
+    private final String dtraceExecutable;
+
+    public DtraceRunner() {
+        dtraceExecutable = getDtracePath();
+    }
+
+    private List<String> getLaunchCmd(String java, String javaOpts,
+            String execClass, String testArgs, String dtraceScript,
+            String dtraceAddOpts) {
+        Asserts.assertTrue(!java.matches("\\s"), "Current dtrace implementation"
+                + " can't handle whitespaces in application path");
+        List<String> result = new ArrayList<>();
+        result.add(dtraceExecutable);
+        result.add(DTRACE_OPTION_PREFIX + System.getProperty("sun.arch.data.model"));
+        result.add(DTRACE_OPTION_PREFIX
+                + ALLOW_ZERO_PROBE_DESCRIPTION_DTRACE_OPTION
+                + ((dtraceAddOpts == null) ? "" : dtraceAddOpts)
+                + RUN_SCRIPT_DTRACE_OPTION); // run_script should be last one
+        result.add(dtraceScript);
+        result.add(DTRACE_OPTION_PREFIX + OUTPUT_FILE_DTRACE_OPTION);
+        result.add(DTRACE_OUT_LOG);
+        result.add(DTRACE_OPTION_PREFIX + RUN_COMMAND_DTRACE_OPTION);
+        result.add(java + " " + javaOpts + " " + execClass + " " + testArgs);
+        return result;
+    }
+
+    private void backupLogFile(File file) {
+        if (file.exists()) {
+            file.renameTo(new File(file.getPath() + ".bak"));
+        }
+    }
+
+    public void runDtrace(String java, String javaOpts, String execClass,
+            String testArgs, String dtraceScript, String dtraceAddOpts,
+            DtraceResultsAnalyzer analyzer) {
+        backupLogFile(new File(DTRACE_OUT_LOG));
+        ProcessBuilder pbuilder = new ProcessBuilder(
+                getLaunchCmd(java, javaOpts, execClass, testArgs,
+                        dtraceScript, dtraceAddOpts));
+        OutputAnalyzer oa;
+        try {
+            oa = new OutputAnalyzer(pbuilder.start());
+        } catch (IOException e) {
+            throw new Error("TESTBUG: Can't start process", e);
+        }
+        analyzer.analyze(oa, DTRACE_OUT_LOG);
+    }
+
+    public static boolean dtraceAvailable() {
+        String path = getDtracePath();
+        if (path == null) {
+            return false;
+        }
+        // now we'll launch dtrace to trace itself just to be sure it works
+        // and have all additional previleges set
+        ProcessBuilder pbuilder = new ProcessBuilder(path, path);
+        try {
+            OutputAnalyzer oa = new OutputAnalyzer(pbuilder.start());
+            if (oa.getExitValue() != 0) {
+                return false;
+            }
+        } catch (IOException e) {
+            throw new Error("Couldn't launch dtrace", e);
+        }
+        return true;
+    }
+
+    private static String getDtracePath() {
+        String propPath = System.getProperty(DTRACE_PATH_PROPERTY);
+        if (propPath != null && new File(propPath).exists()) {
+            return propPath;
+        } else if (new File(DTRACE_DEFAULT_PATH).exists()) {
+            return DTRACE_DEFAULT_PATH;
+        }
+        return null;
+    }
+}
--- a/test/compiler/codecache/dtrace/SegmentedCodeCacheDtraceTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/dtrace/SegmentedCodeCacheDtraceTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/codecache/jmx/BeanTypeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/BeanTypeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/CodeCacheUtils.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/CodeCacheUtils.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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)
--- a/test/compiler/codecache/jmx/CodeHeapBeanPresenceTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/CodeHeapBeanPresenceTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/GetUsageTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/GetUsageTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/ManagerNamesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/ManagerNamesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/MemoryPoolsPresenceTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/MemoryPoolsPresenceTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/PeakUsageTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/PeakUsageTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/codecache/jmx/PoolsIndependenceTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/PoolsIndependenceTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/ThresholdNotificationsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/ThresholdNotificationsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/UsageThresholdExceededSeveralTimesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/UsageThresholdExceededSeveralTimesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/UsageThresholdExceededTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/UsageThresholdExceededTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/UsageThresholdIncreasedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/UsageThresholdIncreasedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/jmx/UsageThresholdNotExceededTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/jmx/UsageThresholdNotExceededTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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::*
--- a/test/compiler/codecache/stress/CodeCacheStressRunner.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/stress/CodeCacheStressRunner.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/codecache/stress/Helper.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/stress/Helper.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/codecache/stress/OverloadCompileQueueTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/stress/OverloadCompileQueueTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/stress/RandomAllocationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/stress/RandomAllocationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codecache/stress/UnexpectedDeoptimizationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codecache/stress/UnexpectedDeoptimizationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codegen/Test6823354.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codegen/Test6823354.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codegen/Test6896617.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codegen/Test6896617.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/codegen/Test7100757.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codegen/Test7100757.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/codegen/aes/TestAESMain.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/codegen/aes/TestAESMain.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/compilercontrol/InlineMatcherTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/InlineMatcherTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityBase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityBase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOff.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOff.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOn.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOn.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityFlag.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityFlag.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/commandfile/CompileOnlyTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/commandfile/CompileOnlyTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/commandfile/ExcludeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/commandfile/ExcludeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/commandfile/LogTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/commandfile/LogTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/commandfile/PrintTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/commandfile/PrintTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/commands/CompileOnlyTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/commands/CompileOnlyTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/commands/ExcludeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/commands/ExcludeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/commands/LogTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/commands/LogTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/commands/PrintTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/commands/PrintTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/directives/CompileOnlyTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/directives/CompileOnlyTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/directives/ExcludeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/directives/ExcludeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/directives/LogTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/directives/LogTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/directives/PrintTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/directives/PrintTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/AddAndRemoveTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/AddAndRemoveTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/AddCompileOnlyTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/AddCompileOnlyTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/AddExcludeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/AddExcludeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/AddLogTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/AddLogTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/AddPrintAssemblyTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/AddPrintAssemblyTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/ClearDirectivesStackTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/ClearDirectivesStackTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/PrintDirectivesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/PrintDirectivesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/jcmd/StressAddMultiThreadedTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/jcmd/StressAddMultiThreadedTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/logcompilation/LogTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/logcompilation/LogTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/matcher/MethodMatcherTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/matcher/MethodMatcherTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/mixed/RandomCommandsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/mixed/RandomCommandsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/mixed/RandomValidCommandsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/mixed/RandomValidCommandsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/compilercontrol/parser/DirectiveParserTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/parser/DirectiveParserTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/compilercontrol/parser/DirectiveStressTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/parser/DirectiveStressTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/parser/HugeDirectiveUtil.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/parser/HugeDirectiveUtil.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/AbstractTestBase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/AbstractTestBase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/actions/BaseAction.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/actions/BaseAction.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/actions/CompileAction.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/actions/CompileAction.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/compilercontrol/share/method/MethodDescriptor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/method/MethodDescriptor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/method/MethodGenerator.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/method/MethodGenerator.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/pool/MethodHolder.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/pool/MethodHolder.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/pool/PoolHelper.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/pool/PoolHelper.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/pool/SubMethodHolder.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/pool/SubMethodHolder.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/processors/CommandProcessor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/processors/CommandProcessor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/processors/LogProcessor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/processors/LogProcessor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/processors/PrintDirectivesProcessor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/processors/PrintDirectivesProcessor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/processors/PrintProcessor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/processors/PrintProcessor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/scenario/AbstractCommandBuilder.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/scenario/AbstractCommandBuilder.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/scenario/DirectiveBuilder.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/scenario/DirectiveBuilder.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/scenario/Executor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/scenario/Executor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/compilercontrol/share/scenario/JcmdStateBuilder.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/scenario/JcmdStateBuilder.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/compilercontrol/share/scenario/Scenario.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/compilercontrol/share/scenario/Scenario.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/cpuflags/RestoreMXCSR.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/cpuflags/RestoreMXCSR.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/debug/VerifyAdapterSharing.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/debug/VerifyAdapterSharing.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/eliminateAutobox/UnsignedLoads.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/eliminateAutobox/UnsignedLoads.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/floatingpoint/TestPow2.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/floatingpoint/TestPow2.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/gcbarriers/PreserveFPRegistersTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/gcbarriers/PreserveFPRegistersTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/inlining/InlineAccessors.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/inlining/InlineAccessors.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/interpreter/DisableOSRTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/interpreter/DisableOSRTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/IntrinsicAvailableTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/IntrinsicAvailableTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/intrinsics/IntrinsicDisabledTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/IntrinsicDisabledTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/intrinsics/bigInteger/MontgomeryMultiplyTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bigInteger/MontgomeryMultiplyTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/BMITestRunner.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/BMITestRunner.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/bmi/TestAndnI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestAndnI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestAndnL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestAndnL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestBlsiI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestBlsiI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestBlsiL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestBlsiL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestBlsmskI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestBlsmskI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestBlsmskL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestBlsmskL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestBlsrI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestBlsrI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestBlsrL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestBlsrL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestLzcntI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestLzcntI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestLzcntL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestLzcntL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestTzcntI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestTzcntI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/TestTzcntL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/TestTzcntL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/AndnTestI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/AndnTestI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/AndnTestL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/AndnTestL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/BlsiTestI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/BlsiTestI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/BlsiTestL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/BlsiTestL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/BlsrTestI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/BlsrTestI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/BlsrTestL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/BlsrTestL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/AddExactIConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/AddExactIConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/AddExactILoadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/AddExactILoadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/AddExactINonConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/AddExactINonConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/AddExactIRepeatTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/AddExactIRepeatTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/AddExactLConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/AddExactLConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/AddExactLNonConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/AddExactLNonConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/DecExactITest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/DecExactITest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/DecExactLTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/DecExactLTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/IncExactITest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/IncExactITest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/IncExactLTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/IncExactLTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/MulExactIConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/MulExactIConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/MulExactILoadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/MulExactILoadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/MulExactILoopDependentTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/MulExactILoopDependentTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/MulExactINonConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/MulExactINonConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/MulExactIRepeatTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/MulExactIRepeatTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/MulExactLConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/MulExactLConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/MulExactLNonConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/MulExactLNonConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/NegExactIConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/NegExactIConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/NegExactILoadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/NegExactILoadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/NegExactILoopDependentTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/NegExactILoopDependentTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/NegExactINonConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/NegExactINonConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/NegExactLConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/NegExactLConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/NegExactLNonConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/NegExactLNonConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/SubExactICondTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/SubExactICondTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/SubExactIConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/SubExactIConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/SubExactILoadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/SubExactILoadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/SubExactILoopDependentTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/SubExactILoopDependentTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/SubExactINonConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/SubExactINonConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/SubExactIRepeatTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/SubExactIRepeatTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/SubExactLConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/SubExactLConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/SubExactLNonConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/SubExactLNonConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/intrinsics/mathexact/sanity/AddExactIntTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/AddExactIntTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/AddExactLongTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/AddExactLongTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/DecrementExactIntTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/DecrementExactIntTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/DecrementExactLongTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/DecrementExactLongTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/IncrementExactIntTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/IncrementExactIntTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/IncrementExactLongTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/IncrementExactLongTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/MultiplyExactIntTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/MultiplyExactIntTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/MultiplyExactLongTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/MultiplyExactLongTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/NegateExactIntTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/NegateExactIntTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/NegateExactLongTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/NegateExactLongTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/SubtractExactIntTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/SubtractExactIntTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/mathexact/sanity/SubtractExactLongTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/mathexact/sanity/SubtractExactLongTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/object/TestClone.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/object/TestClone.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedAArch64CPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedAArch64CPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedSparcCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedSparcCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedX86CPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedX86CPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/sha/cli/testcases/UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/testcases/UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForSupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForSupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/string/TestHasNegatives.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/string/TestHasNegatives.java	Fri Sep 02 02:41:12 2016 +0000
@@ -30,7 +30,6 @@
  * @library /compiler/patches
  *
  * @build java.base/java.lang.Helper
- * @build compiler.intrinsics.string.TestHasNegatives
  * @run main compiler.intrinsics.string.TestHasNegatives
  */
 
--- a/test/compiler/intrinsics/string/TestStringIntrinsicMemoryFlow.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/string/TestStringIntrinsicMemoryFlow.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/intrinsics/string/TestStringIntrinsicRangeChecks.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/string/TestStringIntrinsicRangeChecks.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/intrinsics/string/TestStringIntrinsics2.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/string/TestStringIntrinsics2.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/unsafe/DirectByteBufferTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/unsafe/DirectByteBufferTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.
--- a/test/compiler/intrinsics/unsafe/HeapByteBufferTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/unsafe/HeapByteBufferTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/intrinsics/unsafe/TestUnsafeMismatchedArrayFieldAccess.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/intrinsics/unsafe/TestUnsafeMismatchedArrayFieldAccess.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jsr292/ConcurrentClassLoadingTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jsr292/ConcurrentClassLoadingTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/jsr292/ContinuousCallSiteTargetChange.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jsr292/ContinuousCallSiteTargetChange.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/jsr292/MHInlineTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jsr292/MHInlineTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/jsr292/NonInlinedCall/Agent.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jsr292/NonInlinedCall/Agent.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/jsr292/NonInlinedCall/GCTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jsr292/NonInlinedCall/GCTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/jsr292/NonInlinedCall/InvokeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jsr292/NonInlinedCall/InvokeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jsr292/NonInlinedCall/RedefineTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jsr292/NonInlinedCall/RedefineTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jsr292/PollutedTrapCounts.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jsr292/PollutedTrapCounts.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/SecurityRestrictionsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/SecurityRestrictionsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/jvmci/compilerToVM/CanInlineMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/CanInlineMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/CollectCountersTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/CollectCountersTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/CompileCodeTestCase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/CompileCodeTestCase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/jvmci/compilerToVM/DebugOutputTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/DebugOutputTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetImplementorTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetImplementorTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*
--- a/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodAtSlotTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodAtSlotTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetSymbolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetSymbolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/InitializeConfigurationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/InitializeConfigurationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/IsMatureTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/IsMatureTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/LookupTypeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/LookupTypeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/ReprofileTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ReprofileTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/errors/TestInvalidCompilationResult.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/errors/TestInvalidCompilationResult.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/events/JvmciShutdownEventTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/events/JvmciShutdownEventTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/jvmci/meta/StableFieldTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/jvmci/meta/StableFieldTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/loopopts/UseCountedLoopSafepoints.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/loopopts/UseCountedLoopSafepoints.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/loopopts/superword/TestVectorizationWithInvariant.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/loopopts/superword/TestVectorizationWithInvariant.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/onSpinWait/TestOnSpinWait.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/onSpinWait/TestOnSpinWait.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/compiler/oracle/CheckCompileCommandOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/oracle/CheckCompileCommandOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/oracle/GetMethodOptionTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/oracle/GetMethodOptionTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/oracle/MethodMatcherTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/oracle/MethodMatcherTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/oracle/TestCompileCommand.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/oracle/TestCompileCommand.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/compiler/print/TestProfileReturnTypePrinting.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/print/TestProfileReturnTypePrinting.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/profiling/spectrapredefineclass/Agent.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/profiling/spectrapredefineclass/Agent.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/test/compiler/profiling/spectrapredefineclass/Launcher.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/profiling/spectrapredefineclass/Launcher.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
+        }
     }
 }
--- a/test/compiler/profiling/spectrapredefineclass_classloaders/Agent.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/profiling/spectrapredefineclass_classloaders/Agent.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
-
-        PrintWriter pw = new PrintWriter("MANIFEST.MF");
+    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");
+        }
 
-        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);
+        }
     }
 }
--- a/test/compiler/rangechecks/TestExplicitRangeChecks.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rangechecks/TestExplicitRangeChecks.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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*
--- a/test/compiler/rangechecks/TestRangeCheckSmearing.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rangechecks/TestRangeCheckSmearing.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/cli/RTMLockingAwareTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/RTMLockingAwareTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/rtm/cli/TestRTMRetryCountOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMRetryCountOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/compiler/rtm/locking/TestRTMAbortRatio.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMAbortRatio.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/rtm/locking/TestRTMAbortThreshold.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMAbortThreshold.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestRTMLockingThreshold.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMLockingThreshold.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/rtm/locking/TestRTMRetryCount.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMRetryCount.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestRTMSpinLoopCount.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMSpinLoopCount.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestUseRTMDeopt.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestUseRTMDeopt.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestUseRTMForStackLocks.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestUseRTMForStackLocks.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/runtime/Test8010927.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/runtime/Test8010927.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/runtime/cr8015436/Test8015436.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/runtime/cr8015436/Test8015436.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/compiler/stable/TestStableBoolean.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableBoolean.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableByte.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableByte.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableChar.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableChar.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableDouble.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableDouble.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableFloat.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableFloat.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableInt.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableInt.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableLong.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableLong.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableObject.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableObject.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableShort.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableShort.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableUByte.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableUByte.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/stable/TestStableUShort.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/stable/TestStableUShort.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/startup/NumCompilerThreadsCheck.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/startup/NumCompilerThreadsCheck.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/compiler/startup/SmallCodeCacheStartup.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/startup/SmallCodeCacheStartup.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/startup/StartupOutput.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/startup/StartupOutput.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
 
-        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);
+        }
     }
 }
--- a/test/compiler/testlibrary/rtm/RTMTestBase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/testlibrary/rtm/RTMTestBase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/tiered/ConstantGettersTransitionsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/tiered/ConstantGettersTransitionsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/tiered/LevelTransitionTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/tiered/LevelTransitionTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/tiered/NonTieredLevelsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/tiered/NonTieredLevelsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/tiered/TieredLevelsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/tiered/TieredLevelsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/tiered/TransitionsTestExecutor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/tiered/TransitionsTestExecutor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/types/TestMeetIncompatibleInterfaceArrays.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/types/TestMeetIncompatibleInterfaceArrays.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/types/correctness/CorrectnessTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/types/correctness/CorrectnessTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/types/correctness/OffTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/types/correctness/OffTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/compiler/uncommontrap/DeoptReallocFailure.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/uncommontrap/DeoptReallocFailure.java	Fri Sep 02 02:41:12 2016 +0000
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8146416
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
--- a/test/compiler/uncommontrap/Test8009761.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/uncommontrap/Test8009761.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/uncommontrap/TestUnstableIfTrap.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/uncommontrap/TestUnstableIfTrap.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/unsafe/UnsafeGetConstantField.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/unsafe/UnsafeGetConstantField.java	Fri Sep 02 02:41:12 2016 +0000
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary tests on constant folding of unsafe get operations
- * @library /testlibrary
+ * @library /test/lib
  *
  * @requires vm.flavor == "server"
  *
--- a/test/compiler/unsafe/UnsafeGetStableArrayElement.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/unsafe/UnsafeGetStableArrayElement.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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"
  *
--- a/test/compiler/unsafe/UnsafeRaw.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/unsafe/UnsafeRaw.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/AllocationCodeBlobTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/AllocationCodeBlobTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/compiler/whitebox/BlockingCompilation.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/BlockingCompilation.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/ClearMethodStateTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/ClearMethodStateTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/DeoptimizeAllTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/DeoptimizeAllTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/DeoptimizeFramesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/DeoptimizeFramesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/DeoptimizeMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/DeoptimizeMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/DeoptimizeMultipleOSRTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/DeoptimizeMultipleOSRTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/ForceNMethodSweepTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/ForceNMethodSweepTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/GetCodeHeapEntriesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/GetCodeHeapEntriesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/GetNMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/GetNMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/IsMethodCompilableTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/IsMethodCompilableTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/LockCompilationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/LockCompilationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/SetDontInlineMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/SetDontInlineMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/compiler/whitebox/SetForceInlineMethodTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/compiler/whitebox/SetForceInlineMethodTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/CondCardMark/Basic.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/CondCardMark/Basic.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/TestCardTablePageCommits.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/TestCardTablePageCommits.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/TestDisableExplicitGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/TestDisableExplicitGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/TestObjectAlignment.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/TestObjectAlignment.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/TestSmallHeap.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/TestSmallHeap.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/TestSoftReferencesBehaviorOnOOME.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/TestSoftReferencesBehaviorOnOOME.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/TestVerifyDuringStartup.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/TestVerifyDuringStartup.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/TestVerifySilently.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/TestVerifySilently.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/TestVerifySubSet.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/TestVerifySubSet.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/gc/arguments/AllocationHelper.java	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* This code is free software; you can redistribute it and/or modify it
+* under the terms of the GNU General Public License version 2 only, as
+* published by the Free Software Foundation.
+*
+* This code is distributed in the hope that it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+* version 2 for more details (a copy is included in the LICENSE file that
+* accompanied this code).
+*
+* You should have received a copy of the GNU General Public License version
+* 2 along with this work; if not, write to the Free Software Foundation,
+* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+* or visit www.oracle.com if you need additional information or have any
+* questions.
+*/
+
+import java.util.LinkedList;
+import java.util.concurrent.Callable;
+
+/**
+ * Helper class which allocates memory.
+ *
+ * Typical usage:
+ * <pre>
+ * {@code
+ *           AllocationHelper allocator = new AllocationHelper(MAX_ITERATIONS, ARRAY_LENGTH, CHUNK_SIZE,
+ *                   () -> (verifier()));
+ *           // Allocate byte[CHUNK_SIZE] ARRAY_LENGTH times. Total allocated bytes will be CHUNK_SIZE * ARRAY_LENGTH + refs length.
+ *           // Then invoke verifier and iterate MAX_ITERATIONS times.
+ *           allocator.allocateMemoryAndVerify();
+ * }
+ * </pre>
+ */
+public final class AllocationHelper {
+
+    private final int arrayLength;
+    private final int maxIterations;
+    private final int chunkSize;
+
+    // garbageStorage is used to store link to garbage to prevent optimization.
+    private static Object garbageStorage;
+    private byte garbage[][];
+    private final Callable<?> verifierInstance;
+
+    /**
+     * Create an AllocationHelper with specified iteration count, array length, chunk size and verifier.
+     *
+     * @param maxIterations
+     * @param arrayLength
+     * @param chunkSize
+     * @param verifier - Callable instance which will be invoked after all allocation cycle. Can be null;
+     */
+    public AllocationHelper(int maxIterations, int arrayLength, int chunkSize, Callable<?> verifier) {
+        if ((arrayLength <= 0) || (maxIterations <= 0) || (chunkSize <= 0)) {
+            throw new IllegalArgumentException("maxIterations, arrayLength and chunkSize should be greater then 0.");
+        }
+        this.arrayLength = arrayLength;
+        this.maxIterations = maxIterations;
+        this.chunkSize = chunkSize;
+        verifierInstance = verifier;
+        garbage = new byte[this.arrayLength][];
+        garbageStorage = garbage;
+    }
+
+    private void allocateMemoryOneIteration() {
+        for (int j = 0; j < arrayLength; j++) {
+            garbage[j] = new byte[chunkSize];
+        }
+    }
+
+    /**
+     * Allocate memory and invoke Verifier during all iteration.
+     *
+     * @throws java.lang.Exception
+     */
+    public void allocateMemoryAndVerify() throws Exception {
+        for (int i = 0; i < maxIterations; i++) {
+            allocateMemoryOneIteration();
+            if (verifierInstance != null) {
+                verifierInstance.call();
+            }
+        }
+    }
+
+    /**
+     * The same as allocateMemoryAndVerify() but hides OOME
+     *
+     * @throws Exception
+     */
+    public void allocateMemoryAndVerifyNoOOME() throws Exception {
+        try {
+            allocateMemoryAndVerify();
+        } catch (OutOfMemoryError e) {
+            // exit on OOME
+        }
+    }
+
+    /**
+     * Release link to allocated garbage to make it available for further GC
+     */
+    public void release() {
+        if (garbage != null) {
+            garbage = null;
+            garbageStorage = null;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/gc/arguments/HeapRegionUsageTool.java	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* This code is free software; you can redistribute it and/or modify it
+* under the terms of the GNU General Public License version 2 only, as
+* published by the Free Software Foundation.
+*
+* This code is distributed in the hope that it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+* version 2 for more details (a copy is included in the LICENSE file that
+* accompanied this code).
+*
+* You should have received a copy of the GNU General Public License version
+* 2 along with this work; if not, write to the Free Software Foundation,
+* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+* or visit www.oracle.com if you need additional information or have any
+* questions.
+*/
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.MemoryUsage;
+
+/**
+ * Utility class used by tests to get heap region usage.
+ */
+public final class HeapRegionUsageTool {
+
+    /**
+     * Get MemoryUsage from MemoryPoolMXBean which name matches passed string.
+     *
+     * @param name
+     * @return MemoryUsage
+     */
+    private static MemoryUsage getUsage(String name){
+        for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) {
+            if (pool.getName().matches(name)) {
+                return pool.getUsage();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Get MemoryUsage of Eden space.
+     *
+     * @return MemoryUsage
+     */
+    public static MemoryUsage getEdenUsage() {
+        return getUsage(".*Eden.*");
+    }
+
+    /**
+     * Get MemoryUsage of Survivor space.
+     *
+     * @return MemoryUsage
+     */
+    public static MemoryUsage getSurvivorUsage() {
+        return getUsage(".*Survivor.*");
+    }
+
+    /**
+     * Get memory usage of Tenured space
+     *
+     * @return MemoryUsage
+     */
+    public static MemoryUsage getOldUsage() {
+        return getUsage(".*(Old|Tenured).*");
+    }
+
+    /**
+     * Get heap usage.
+     *
+     * @return MemoryUsage
+     */
+    public static MemoryUsage getHeapUsage() {
+        return ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
+    }
+
+    /**
+     * Helper function to align up.
+     *
+     * @param value
+     * @param alignment
+     * @return aligned value
+     */
+    public static long alignUp(long value, long alignment) {
+        return (value + alignment - 1) & ~(alignment - 1);
+    }
+
+    /**
+     * Helper function to align down.
+     *
+     * @param value
+     * @param alignment
+     * @return aligned value
+     */
+    public static long alignDown(long value, long alignment) {
+        return value & ~(alignment - 1);
+    }
+}
--- a/test/gc/arguments/TestArrayAllocatorMallocLimit.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestArrayAllocatorMallocLimit.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/arguments/TestCMSHeapSizeFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestCMSHeapSizeFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestCompressedClassFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestCompressedClassFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/arguments/TestDisableDefaultGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestDisableDefaultGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/arguments/TestDynMaxHeapFreeRatio.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestDynMaxHeapFreeRatio.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestDynMinHeapFreeRatio.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestDynMinHeapFreeRatio.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestG1ConcMarkStepDurationMillis.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestG1ConcMarkStepDurationMillis.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/gc/arguments/TestG1ConcRefinementThreads.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestG1ConcRefinementThreads.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/gc/arguments/TestG1HeapRegionSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestG1HeapRegionSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/arguments/TestG1HeapSizeFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestG1HeapSizeFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestG1PercentageOptions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestG1PercentageOptions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/arguments/TestHeapFreeRatio.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestHeapFreeRatio.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/arguments/TestInitialTenuringThreshold.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestInitialTenuringThreshold.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/arguments/TestMaxHeapSizeTools.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestMaxHeapSizeTools.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/arguments/TestMaxMinHeapFreeRatioFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestMaxMinHeapFreeRatioFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/arguments/TestMaxNewSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestMaxNewSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/arguments/TestMinAndInitialSurvivorRatioFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestMinAndInitialSurvivorRatioFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/arguments/TestMinInitialErgonomics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestMinInitialErgonomics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestNewRatioFlag.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestNewRatioFlag.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/arguments/TestNewSizeFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestNewSizeFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/arguments/TestNewSizeThreadIncrease.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestNewSizeThreadIncrease.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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).
--- a/test/gc/arguments/TestObjectTenuringFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestObjectTenuringFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/gc/arguments/TestParallelGCThreads.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestParallelGCThreads.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/arguments/TestParallelHeapSizeFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestParallelHeapSizeFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestSelectDefaultGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestSelectDefaultGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/arguments/TestSerialHeapSizeFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestSerialHeapSizeFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestShrinkHeapInSteps.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestShrinkHeapInSteps.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/gc/arguments/TestSurvivorAlignmentInBytesOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestSurvivorAlignmentInBytesOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestSurvivorRatioFlag.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestSurvivorRatioFlag.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/arguments/TestTargetSurvivorRatioFlag.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestTargetSurvivorRatioFlag.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/arguments/TestUnrecognizedVMOptionsHandling.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestUnrecognizedVMOptionsHandling.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/arguments/TestUseCompressedOopsErgo.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestUseCompressedOopsErgo.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/arguments/TestUseCompressedOopsErgoTools.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestUseCompressedOopsErgoTools.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/arguments/TestUseNUMAInterleaving.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestUseNUMAInterleaving.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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[^]]+\\])";
--- a/test/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/class_unloading/TestG1ClassUnloadingHWM.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/class_unloading/TestG1ClassUnloadingHWM.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/cms/GuardShrinkWarning.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/cms/GuardShrinkWarning.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/ergonomics/TestInitialGCThreadLogging.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/ergonomics/TestInitialGCThreadLogging.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/Test2GbHeap.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/Test2GbHeap.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/TestEagerReclaimHumongousRegions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestEagerReclaimHumongousRegions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/TestEagerReclaimHumongousRegionsWithRefs.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestEagerReclaimHumongousRegionsWithRefs.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/TestGCLogMessages.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestGCLogMessages.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/g1/TestHumongousAllocInitialMark.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestHumongousAllocInitialMark.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestHumongousAllocNearlyFullRegion.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestHumongousAllocNearlyFullRegion.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestHumongousCodeCacheRoots.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestHumongousCodeCacheRoots.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/g1/TestHumongousShrinkHeap.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestHumongousShrinkHeap.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestLargePageUseForAuxMemory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestLargePageUseForAuxMemory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/TestNoEagerReclaimOfHumongousRegions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestNoEagerReclaimOfHumongousRegions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestPLABOutput.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestPLABOutput.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/gc/g1/TestPLABSizeBounds.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestPLABSizeBounds.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/g1/TestPrintRegionRememberedSetInfo.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestPrintRegionRememberedSetInfo.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/g1/TestRegionLivenessPrint.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestRegionLivenessPrint.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestRemsetLogging.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestRemsetLogging.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestRemsetLoggingPerRegion.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestRemsetLoggingPerRegion.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestRemsetLoggingThreads.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestRemsetLoggingThreads.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/g1/TestRemsetLoggingTools.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestRemsetLoggingTools.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/g1/TestShrinkAuxiliaryData.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkAuxiliaryData.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/g1/TestShrinkAuxiliaryData00.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkAuxiliaryData00.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestShrinkAuxiliaryData05.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkAuxiliaryData05.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestShrinkAuxiliaryData10.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkAuxiliaryData10.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestShrinkAuxiliaryData15.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkAuxiliaryData15.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestShrinkAuxiliaryData20.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkAuxiliaryData20.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestShrinkAuxiliaryData25.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkAuxiliaryData25.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestShrinkAuxiliaryData30.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkAuxiliaryData30.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/TestShrinkDefragmentedHeap.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestShrinkDefragmentedHeap.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/TestStringDeduplicationAgeThreshold.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringDeduplicationAgeThreshold.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/g1/TestStringDeduplicationFullGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringDeduplicationFullGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/g1/TestStringDeduplicationInterned.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringDeduplicationInterned.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/g1/TestStringDeduplicationPrintOptions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringDeduplicationPrintOptions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/g1/TestStringDeduplicationTableRehash.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringDeduplicationTableRehash.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/g1/TestStringDeduplicationTableResize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringDeduplicationTableResize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/g1/TestStringDeduplicationTools.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringDeduplicationTools.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/TestStringDeduplicationYoungGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringDeduplicationYoungGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/g1/TestStringSymbolTableStats.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/TestStringSymbolTableStats.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/g1/humongousObjects/TestHeapCounters.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/humongousObjects/TestHeapCounters.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/gc/g1/humongousObjects/TestHumongousClassLoader.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/humongousObjects/TestHumongousClassLoader.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/gc/g1/humongousObjects/TestHumongousMovement.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/humongousObjects/TestHumongousMovement.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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:.
--- a/test/gc/g1/humongousObjects/TestHumongousNonArrayAllocation.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/humongousObjects/TestHumongousNonArrayAllocation.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/gc/g1/humongousObjects/TestHumongousThreshold.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/humongousObjects/TestHumongousThreshold.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/gc/g1/humongousObjects/TestNoAllocationsInHRegions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/humongousObjects/TestNoAllocationsInHRegions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/gc/g1/humongousObjects/TestObjectCollected.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/humongousObjects/TestObjectCollected.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  *
--- a/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/g1/ihop/TestIHOPErgo.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/ihop/TestIHOPErgo.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/g1/ihop/TestIHOPStatic.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/ihop/TestIHOPStatic.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/g1/ihop/lib/IhopUtils.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/ihop/lib/IhopUtils.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
 
 /**
--- a/test/gc/g1/mixedgc/TestLogging.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/mixedgc/TestLogging.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/gc/g1/plab/TestPLABEvacuationFailure.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/plab/TestPLABEvacuationFailure.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/g1/plab/TestPLABPromotion.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/plab/TestPLABPromotion.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.
--- a/test/gc/g1/plab/TestPLABResize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/plab/TestPLABResize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.
--- a/test/gc/g1/plab/lib/PLABUtils.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/g1/plab/lib/PLABUtils.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
 /**
--- a/test/gc/logging/TestDeprecatedPrintFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/logging/TestDeprecatedPrintFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/logging/TestGCId.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/logging/TestGCId.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/logging/TestPrintReferences.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/logging/TestPrintReferences.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/logging/TestUnifiedLoggingSwitchStress.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/logging/TestUnifiedLoggingSwitchStress.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/gc/metaspace/InputArguments.java	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+import java.lang.management.RuntimeMXBean;
+import java.lang.management.ManagementFactory;
+import java.util.List;
+
+/**
+ * This class provides access to the input arguments to the VM.
+ */
+public class InputArguments {
+    private static final List<String> args;
+
+    static {
+        RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+        args = runtimeMxBean.getInputArguments();
+    }
+
+    /**
+     * Returns true if {@code arg} is an input argument to the VM.
+     *
+     * This is useful for checking boolean flags such as -XX:+UseSerialGC or
+     * -XX:-UsePerfData.
+     *
+     * @param arg The name of the argument.
+     * @return {@code true} if the given argument is an input argument,
+     *         otherwise {@code false}.
+     */
+    public static boolean contains(String arg) {
+        return args.contains(arg);
+    }
+
+    /**
+     * Returns true if {@code prefix} is the start of an input argument to the
+     * VM.
+     *
+     * This is useful for checking if flags describing a quantity, such as
+     * -XX:+MaxMetaspaceSize=100m, is set without having to know the quantity.
+     * To check if the flag -XX:MaxMetaspaceSize is set, use
+     * {@code InputArguments.containsPrefix("-XX:MaxMetaspaceSize")}.
+     *
+     * @param prefix The start of the argument.
+     * @return {@code true} if the given argument is the start of an input
+     *         argument, otherwise {@code false}.
+     */
+    public static boolean containsPrefix(String prefix) {
+        for (String arg : args) {
+            if (arg.startsWith(prefix)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
--- a/test/gc/metaspace/PerfCounters.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/PerfCounters.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/metaspace/TestCapacityUntilGCWrapAround.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/TestCapacityUntilGCWrapAround.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/metaspace/TestMetaspaceCMSCancel.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/TestMetaspaceCMSCancel.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/metaspace/TestMetaspaceInitialization.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/TestMetaspaceInitialization.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/metaspace/TestMetaspaceMemoryPool.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/TestMetaspaceMemoryPool.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/metaspace/TestMetaspacePerfCounters.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/TestMetaspacePerfCounters.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
+    }
 }
--- a/test/gc/metaspace/TestMetaspaceSizeFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/TestMetaspaceSizeFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/gc/metaspace/TestPerfCountersAndMemoryPools.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/metaspace/TestPerfCountersAndMemoryPools.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.
--- a/test/gc/parallel/AdaptiveGCBoundary.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/parallel/AdaptiveGCBoundary.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/parallel/TestDynShrinkHeap.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/parallel/TestDynShrinkHeap.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/parallel/TestPrintGCDetailsVerbose.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/parallel/TestPrintGCDetailsVerbose.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/serial/HeapChangeLogging.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/serial/HeapChangeLogging.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/startup_warnings/TestCMS.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/startup_warnings/TestCMS.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/startup_warnings/TestDefNewCMS.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/startup_warnings/TestDefNewCMS.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/startup_warnings/TestG1.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/startup_warnings/TestG1.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/gc/startup_warnings/TestParNewCMS.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/startup_warnings/TestParNewCMS.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/startup_warnings/TestParNewSerialOld.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/startup_warnings/TestParNewSerialOld.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/startup_warnings/TestParallelGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/startup_warnings/TestParallelGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/startup_warnings/TestParallelScavengeSerialOld.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/startup_warnings/TestParallelScavengeSerialOld.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/startup_warnings/TestSerialGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/startup_warnings/TestSerialGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/gc/stress/TestMultiThreadStressRSet.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/stress/TestMultiThreadStressRSet.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/stress/TestStressRSetCoarsening.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/stress/TestStressRSetCoarsening.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/survivorAlignment/TestAllocationInEden.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/survivorAlignment/TestAllocationInEden.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/survivorAlignment/TestPromotionFromEdenToTenured.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/survivorAlignment/TestPromotionFromEdenToTenured.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/survivorAlignment/TestPromotionToSurvivor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/survivorAlignment/TestPromotionToSurvivor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/testlibrary/Helpers.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/testlibrary/Helpers.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/gc/whitebox/TestConcMarkCycleWB.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/whitebox/TestConcMarkCycleWB.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/gc/whitebox/TestWBGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/gc/whitebox/TestWBGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/native/GTestWrapper.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/native/GTestWrapper.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/logTestFixture.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/logTestFixture.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
+};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/logTestUtils.inline.hpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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 << ")";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logConfiguration.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logDecorations.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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));
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logDecorators.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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());
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logFileOutput.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logLevel.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logOutputList.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logTag.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logTagLevelExpression.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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()));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/logging/test_logTagSet.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/native/utilities/test_bitMap_setops.cpp	Fri Sep 02 02:41:12 2016 +0000
@@ -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)
+
--- a/test/runtime/8026365/InvokeSpecialAnonTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/8026365/InvokeSpecialAnonTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/BadObjectClass/BootstrapRedefine.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/BadObjectClass/BootstrapRedefine.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/BoolReturn/NativeSmallIntCallsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/BoolReturn/NativeSmallIntCallsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/runtime/BootClassAppendProp/BootClassPathAppend.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/BootClassAppendProp/BootClassPathAppend.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.
--- a/test/runtime/BootClassAppendProp/BootClassPathAppendProp.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/BootClassAppendProp/BootClassPathAppendProp.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CDSCompressedKPtrs/XShareAuto.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CDSCompressedKPtrs/XShareAuto.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/ClassFile/JsrRewriting.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ClassFile/JsrRewriting.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/ClassFile/OomWhileParsingRepeatedJsr.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ClassFile/OomWhileParsingRepeatedJsr.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/ClassFile/UnsupportedClassFileVersion.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ClassFile/UnsupportedClassFileVersion.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/ClassUnload/KeepAliveClass.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ClassUnload/KeepAliveClass.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/ClassUnload/KeepAliveClassLoader.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ClassUnload/KeepAliveClassLoader.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/ClassUnload/KeepAliveObject.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ClassUnload/KeepAliveObject.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/ClassUnload/KeepAliveSoftReference.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ClassUnload/KeepAliveSoftReference.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/ClassUnload/UnloadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ClassUnload/UnloadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/CommandLine/BooleanFlagWithInvalidValue.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/BooleanFlagWithInvalidValue.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/CompilerConfigFileWarning.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/CompilerConfigFileWarning.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/ConfigFileParsing.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/ConfigFileParsing.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/ConfigFileWarning.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/ConfigFileWarning.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/FlagWithInvalidValue.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/FlagWithInvalidValue.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/IgnoreUnrecognizedVMOptions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/IgnoreUnrecognizedVMOptions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/CommandLine/NonBooleanFlagWithInvalidBooleanPrefix.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/NonBooleanFlagWithInvalidBooleanPrefix.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CommandLine/PrintTouchedMethods.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/PrintTouchedMethods.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CommandLine/TestHexArguments.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/TestHexArguments.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/TestLongUnrecognizedVMOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/TestLongUnrecognizedVMOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CommandLine/TestNullTerminatedFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/TestNullTerminatedFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/CommandLine/TestVMOptions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/TestVMOptions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/TraceExceptionsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/TraceExceptionsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/UnrecognizedVMOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/UnrecognizedVMOption.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/VMAliasOptions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/VMAliasOptions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CommandLine/VMDeprecatedOptions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/VMDeprecatedOptions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CommandLine/VMOptionWarning.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/VMOptionWarning.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CompressedOops/CompressedClassPointers.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CompressedOops/CompressedClassPointers.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CompressedOops/CompressedClassSpaceSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CompressedOops/CompressedClassSpaceSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CompressedOops/CompressedKlassPointerAndOops.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CompressedOops/CompressedKlassPointerAndOops.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CompressedOops/ObjectAlignment.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CompressedOops/ObjectAlignment.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/CompressedOops/UseCompressedOops.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/CompressedOops/UseCompressedOops.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/ConstantPool/BadMethodHandles.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ConstantPool/BadMethodHandles.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/ConstantPool/IntfMethod.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ConstantPool/IntfMethod.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/EnclosingMethodAttr/EnclMethodAttr.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/EnclosingMethodAttr/EnclMethodAttr.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/ErrorHandling/CreateCoredumpOnCrash.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/CreateCoredumpOnCrash.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/ErrorHandling/ErrorHandler.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/ErrorHandler.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/ErrorHandling/ProblematicFrameTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/ProblematicFrameTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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)
  */
 
--- a/test/runtime/ErrorHandling/SecondaryErrorTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/SecondaryErrorTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/ErrorHandling/TestOnError.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/TestOnError.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/ErrorHandling/TestOnOutOfMemoryError.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ErrorHandling/TestOnOutOfMemoryError.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/Final/TestPutMain.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Final/TestPutMain.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/LoadClass/LoadClassNegative.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/LoadClass/LoadClassNegative.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/LocalVariableTable/TestLVT.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/LocalVariableTable/TestLVT.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/Metaspace/FragmentMetaspace.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Metaspace/FragmentMetaspace.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/MinimalVM/CDS.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/MinimalVM/CheckJNI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,43 @@
+/*
+ * 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 CheckJNI
+ */
+
+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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/MinimalVM/Instrumentation.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/MinimalVM/JMX.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/MinimalVM/JVMTI.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/MinimalVM/NMT.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
+
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/MinimalVM/Xprof.java	Fri Sep 02 02:41:12 2016 +0000
@@ -0,0 +1,44 @@
+/*
+ * 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 Xprof
+ */
+
+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);
+
+    }
+}
--- a/test/runtime/NMT/AutoshutdownNMT.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/AutoshutdownNMT.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/BaselineWithParameter.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/BaselineWithParameter.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/ChangeTrackingLevel.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/ChangeTrackingLevel.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/NMT/CheckForProperDetailStackTrace.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/CheckForProperDetailStackTrace.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/NMT/CommandLineDetail.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/CommandLineDetail.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/CommandLineEmptyArgument.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/CommandLineEmptyArgument.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/CommandLineInvalidArgument.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/CommandLineInvalidArgument.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/CommandLineSummary.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/CommandLineSummary.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/CommandLineTurnOffNMT.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/CommandLineTurnOffNMT.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/CommitOverlappingRegions.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/CommitOverlappingRegions.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/NMT/JcmdBaselineDetail.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/JcmdBaselineDetail.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/JcmdDetailDiff.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/JcmdDetailDiff.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/NMT/JcmdScale.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/JcmdScale.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/JcmdScaleDetail.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/JcmdScaleDetail.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/JcmdSummaryDiff.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/JcmdSummaryDiff.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/NMT/JcmdWithNMTDisabled.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/JcmdWithNMTDisabled.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
--- a/test/runtime/NMT/MallocRoundingReportTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/MallocRoundingReportTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/NMT/MallocSiteHashOverflow.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/MallocSiteHashOverflow.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/NMT/MallocStressTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/MallocStressTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/NMT/MallocTestType.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/MallocTestType.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/NMT/MallocTrackingVerify.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/MallocTrackingVerify.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/NMT/NMTWithCDS.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/NMTWithCDS.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/PrintNMTStatistics.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/PrintNMTStatistics.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/PrintNMTStatisticsWithNMTDisabled.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/PrintNMTStatisticsWithNMTDisabled.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/ReleaseCommittedMemory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/ReleaseCommittedMemory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/NMT/ReleaseNoCommit.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/ReleaseNoCommit.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/NMT/ShutdownTwice.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/ShutdownTwice.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/SummaryAfterShutdown.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/SummaryAfterShutdown.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/NMT/SummarySanityCheck.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/SummarySanityCheck.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/NMT/ThreadedMallocTestType.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/ThreadedMallocTestType.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/NMT/ThreadedVirtualAllocTestType.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/ThreadedVirtualAllocTestType.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/NMT/VirtualAllocCommitUncommitRecommit.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/VirtualAllocCommitUncommitRecommit.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/NMT/VirtualAllocTestType.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/NMT/VirtualAllocTestType.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/PerfMemDestroy/PerfMemDestroy.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/PerfMemDestroy/PerfMemDestroy.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/RedefineObject/TestRedefineObject.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/RedefineObject/TestRedefineObject.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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  {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/RedefineTests/ModifyAnonymous.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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");
+    }
+}
--- a/test/runtime/RedefineTests/RedefineAnnotations.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/RedefineTests/RedefineAnnotations.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/RedefineTests/RedefineFinalizer.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/RedefineTests/RedefineFinalizer.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/runtime/RedefineTests/RedefineRunningMethods.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/RedefineTests/RedefineRunningMethods.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/RedefineTests/RedefineRunningMethodsWithBacktrace.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/RedefineTests/RedefineRunningMethodsWithBacktrace.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/ReservedStack/ReservedStackTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ReservedStack/ReservedStackTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/runtime/ReservedStack/ReservedStackTestCompiler.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ReservedStack/ReservedStackTestCompiler.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/runtime/Safepoint/AssertSafepointCheckConsistency1.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Safepoint/AssertSafepointCheckConsistency1.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/Safepoint/AssertSafepointCheckConsistency2.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Safepoint/AssertSafepointCheckConsistency2.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/Safepoint/AssertSafepointCheckConsistency3.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Safepoint/AssertSafepointCheckConsistency3.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/Safepoint/AssertSafepointCheckConsistency4.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Safepoint/AssertSafepointCheckConsistency4.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/SameObject/SameObject.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SameObject/SameObject.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SelectionResolution/AbstractMethodErrorTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/AbstractMethodErrorTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/IllegalAccessErrorTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/IllegalAccessErrorTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/InvokeInterfaceICCE.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/InvokeInterfaceICCE.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/InvokeInterfaceSuccessTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/InvokeInterfaceSuccessTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/InvokeSpecialICCE.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/InvokeSpecialICCE.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/InvokeSpecialSuccessTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/InvokeSpecialSuccessTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/InvokeStaticICCE.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/InvokeStaticICCE.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/InvokeStaticSuccessTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/InvokeStaticSuccessTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -27,7 +27,6 @@
  * generate InvokeStaticSuccessTest
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main InvokeStaticSuccessTest
  */
 
--- a/test/runtime/SelectionResolution/InvokeVirtualICCE.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/InvokeVirtualICCE.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/InvokeVirtualSuccessTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/InvokeVirtualSuccessTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/SelectionResolution/NoSuchMethodErrorTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SelectionResolution/NoSuchMethodErrorTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -27,7 +27,6 @@
  * generate NoSuchMethodError
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main NoSuchMethodErrorTest
  */
 
--- a/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/BootAppendTests.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/BootAppendTests.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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";
--- a/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/DefaultUseWithClient.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/DefaultUseWithClient.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/DumpSymbolAndStringTable.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/DumpSymbolAndStringTable.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/LimitSharedSizes.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/LimitSharedSizes.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/SASymbolTableTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/SASymbolTableTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/SharedArchiveFile/SharedArchiveFile.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/SharedArchiveFile.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/SharedBaseAddress.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/SharedBaseAddress.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/SharedArchiveFile/SharedStrings.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/SharedStrings.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/SharedStringsDedup.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/SharedStringsDedup.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/Thread/Fibonacci.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Thread/Fibonacci.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/Thread/TestThreadDumpMonitorContention.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Thread/TestThreadDumpMonitorContention.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/Thread/ThreadPriorities.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Thread/ThreadPriorities.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/ThreadSignalMask/ThreadSignalMask.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/ThreadSignalMask/ThreadSignalMask.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/runtime/Throwable/StackTraceLogging.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Throwable/StackTraceLogging.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/Throwable/TestThrowable.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Throwable/TestThrowable.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/Throwable/ThrowableIntrospectionSegfault.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Throwable/ThrowableIntrospectionSegfault.java	Fri Sep 02 02:41:12 2016 +0000
@@ -26,7 +26,6 @@
  * @bug 8033735
  * @summary check backtrace field introspection
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
  * @run main ThrowableIntrospectionSegfault
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/TransitiveOverrideCFV50/TransitiveOverrideCFV50.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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();
+    }
+}
--- a/test/runtime/Unsafe/AllocateInstance.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/AllocateInstance.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/AllocateMemory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/AllocateMemory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/CopyMemory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/CopyMemory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/DefineClass.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/DefineClass.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/FieldOffset.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/FieldOffset.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
--- a/test/runtime/Unsafe/GetField.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetField.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
--- a/test/runtime/Unsafe/GetPutAddress.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutAddress.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutBoolean.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutBoolean.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutByte.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutByte.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutChar.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutChar.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutDouble.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutDouble.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutFloat.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutFloat.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutInt.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutInt.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutLong.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutLong.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutObject.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutObject.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetPutShort.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetPutShort.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/GetUncompressedObject.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/GetUncompressedObject.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/Unsafe/NestedUnsafe.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/NestedUnsafe.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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);
--- a/test/runtime/Unsafe/PageSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/PageSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/PrimitiveHostClass.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/PrimitiveHostClass.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/Unsafe/RangeCheck.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/RangeCheck.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/Unsafe/Reallocate.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/Reallocate.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/SetMemory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/SetMemory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/Unsafe/ThrowException.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/Unsafe/ThrowException.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/XCheckJniJsig/XCheckJSig.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/XCheckJniJsig/XCheckJSig.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/classFileParserBug/ClassFileParserBug.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/classFileParserBug/ClassFileParserBug.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/contended/Options.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/contended/Options.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/duplAttributes/DuplAttributesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/duplAttributes/DuplAttributesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/execstack/Testexecstack.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/execstack/Testexecstack.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/getSysPackage/GetSysPkgTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/getSysPackage/GetSysPkgTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/interned/SanityTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/interned/SanityTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/jni/ToStringInInterfaceTest/ToStringTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/jni/ToStringInInterfaceTest/ToStringTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/logging/BiasedLockingTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/BiasedLockingTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/ClassInitializationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/ClassInitializationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/logging/ClassLoadUnloadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/ClassLoadUnloadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/logging/ClassResolutionTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/ClassResolutionTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/runtime/logging/CompressedOopsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/CompressedOopsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/DefaultMethodsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/DefaultMethodsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/ExceptionsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/ExceptionsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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) {
--- a/test/runtime/logging/ItablesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/ItablesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/LoaderConstraintsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/LoaderConstraintsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/logging/ModulesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/ModulesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/MonitorInflationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/MonitorInflationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/MonitorMismatchTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/MonitorMismatchTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/OsCpuLoggingTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/OsCpuLoggingTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/logging/ProtectionDomainVerificationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/ProtectionDomainVerificationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/logging/RemovedDevelopFlagsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/RemovedDevelopFlagsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/logging/SafepointCleanupTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/SafepointCleanupTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/SafepointTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/SafepointTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/StartupTimeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/StartupTimeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/ThreadLoggingTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/ThreadLoggingTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/logging/VMOperationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/VMOperationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/VerificationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/VerificationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/logging/VtablesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/logging/VtablesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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");
--- a/test/runtime/memory/LargePages/TestLargePageSizeInBytes.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/memory/LargePages/TestLargePageSizeInBytes.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/memory/LargePages/TestLargePagesFlags.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/memory/LargePages/TestLargePagesFlags.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/memory/ReadFromNoaccessArea.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/memory/ReadFromNoaccessArea.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/memory/ReadVMPageSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/memory/ReadVMPageSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/memory/ReserveMemory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/memory/ReserveMemory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/memory/RunUnitTestsConcurrently.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/memory/RunUnitTestsConcurrently.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/memory/StressVirtualSpaceResize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/memory/StressVirtualSpaceResize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/AccModuleTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccModuleTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/AccessCheck/CheckRead.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/CheckRead.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/DiffCL_Umod.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_Umod.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/ExpQualOther.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/ExpQualOther.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/ExpQualToM1.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/ExpQualToM1.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/ExpUnqual.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/ExpUnqual.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/ExportAllUnnamed.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/ExportAllUnnamed.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/PkgNotExp.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/PkgNotExp.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/Umod.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/Umod.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodDiffCL_Umod.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodDiffCL_Umod.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodDiffCL_UmodUpkg.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodDiffCL_UmodUpkg.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodUPkg.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUPkg.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_Umod.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_Umod.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/UmodUpkg_Umod.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkg_Umod.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheck/Umod_UmodUpkg.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheck/Umod_UmodUpkg.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/runtime/modules/AccessCheckAllUnnamed.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheckAllUnnamed.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/AccessCheckExp.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheckExp.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/AccessCheckJavaBase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheckJavaBase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/AccessCheckRead.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheckRead.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/runtime/modules/AccessCheckSuper.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheckSuper.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/AccessCheckUnnamed.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheckUnnamed.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/AccessCheckWorks.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/AccessCheckWorks.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/ExportTwice.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/ExportTwice.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/IgnoreModulePropertiesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/IgnoreModulePropertiesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.
--- a/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/JVMAddModuleExports.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMAddModuleExports.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/JVMAddModuleExportsToAll.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMAddModuleExportsToAll.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/JVMAddModulePackage.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMAddModulePackage.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/JVMAddReadsModule.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMAddReadsModule.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/JVMCanReadModule.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMCanReadModule.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/JVMDefineModule.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMDefineModule.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/JVMGetModuleByPkgName.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMGetModuleByPkgName.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/JVMIsExportedToModule.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/JVMIsExportedToModule.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/LoadUnloadModuleStress.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/LoadUnloadModuleStress.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/ModuleOptionsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/ModuleOptionsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/modules/ModuleOptionsWarn.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/ModuleOptionsWarn.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/modules/ModuleStress/ExportModuleStressTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/ModuleStress/ExportModuleStressTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/ModuleStress/ModuleStress.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/ModuleStress/ModuleStress.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/modules/ModuleStress/ModuleStressGC.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/ModuleStress/ModuleStressGC.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/PatchModule/BasicJarBuilder.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/BasicJarBuilder.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/modules/PatchModule/PatchModule2Dirs.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModule2Dirs.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/modules/PatchModule/PatchModuleCDS.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModuleCDS.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/PatchModule/PatchModuleDupJavaBase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModuleDupJavaBase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/modules/PatchModule/PatchModuleDupModule.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModuleDupModule.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/PatchModule/PatchModuleJavaBase.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModuleJavaBase.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/PatchModule/PatchModuleTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModuleTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/PatchModule/PatchModuleTestJar.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModuleTestJar.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/runtime/modules/PatchModule/PatchModuleTraceCL.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/PatchModule/PatchModuleTraceCL.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/Visibility/PatchModuleVisibility.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/Visibility/PatchModuleVisibility.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/modules/Visibility/XbootcpNoVisibility.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/Visibility/XbootcpNoVisibility.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/modules/Visibility/XbootcpVisibility.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/modules/Visibility/XbootcpVisibility.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/runtime/os/AvailableProcessors.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/os/AvailableProcessors.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/verifier/OverriderMsg.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/verifier/OverriderMsg.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/verifier/TestANewArray.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/verifier/TestANewArray.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/verifier/TestMultiANewArray.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/verifier/TestMultiANewArray.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/runtime/verifier/TraceClassRes.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/verifier/TraceClassRes.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/runtime/whitebox/WBStackSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/runtime/whitebox/WBStackSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/sanity/MismatchedWhiteBox/WhiteBox.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/sanity/MismatchedWhiteBox/WhiteBox.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/sanity/WBApi.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/sanity/WBApi.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/serviceability/ParserTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/ParserTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/serviceability/attach/AttachSetGetFlag.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/attach/AttachSetGetFlag.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/attach/AttachWithStalePidFile.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/attach/AttachWithStalePidFile.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/dcmd/compiler/CodeCacheTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/compiler/CodeCacheTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/serviceability/dcmd/compiler/CodelistTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/compiler/CodelistTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/dcmd/compiler/CompilerDirectivesDCMDTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/compiler/CompilerDirectivesDCMDTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/dcmd/compiler/CompilerQueueTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/compiler/CompilerQueueTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/dcmd/framework/HelpTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/framework/HelpTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/framework/InvalidCommandTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/framework/InvalidCommandTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/framework/VMVersionTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/framework/VMVersionTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/gc/ClassHistogramAllTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/gc/ClassHistogramAllTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/gc/ClassHistogramTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/gc/ClassHistogramTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/gc/FinalizerInfoTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/gc/FinalizerInfoTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/gc/HeapDumpAllTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/gc/HeapDumpAllTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/gc/HeapDumpTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/gc/HeapDumpTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/gc/HeapInfoTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/gc/HeapInfoTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/gc/RunFinalizationTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/gc/RunFinalizationTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/gc/RunGCTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/gc/RunGCTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/jvmti/DataDumpDcmdTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/jvmti/DataDumpDcmdTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/thread/PrintConcurrentLocksTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/thread/PrintConcurrentLocksTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/thread/PrintTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/thread/PrintTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/vm/ClassHierarchyTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/vm/ClassHierarchyTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/serviceability/dcmd/vm/ClassLoaderStatsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/vm/ClassLoaderStatsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
--- a/test/serviceability/dcmd/vm/CommandLineTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/vm/CommandLineTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/vm/DynLibsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/vm/DynLibsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/dcmd/vm/FlagsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/vm/FlagsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/vm/SetVMFlagTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/vm/SetVMFlagTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/dcmd/vm/SystemPropertiesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/vm/SystemPropertiesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/dcmd/vm/UptimeTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/dcmd/vm/UptimeTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -24,7 +24,7 @@
 /**
  * @test
  * @summary Verifies the JVMTI GetAllModules API
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm -agentlib:JvmtiGetAllModulesTest JvmtiGetAllModulesTest
  *
  */
--- a/test/serviceability/jvmti/GetObjectSizeClass.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/jvmti/GetObjectSizeClass.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/serviceability/jvmti/GetObjectSizeOverflow.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/jvmti/GetObjectSizeOverflow.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/serviceability/jvmti/TestLambdaFormRetransformation.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/jvmti/TestLambdaFormRetransformation.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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" +
--- a/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/serviceability/logging/TestBasicLogOutput.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/logging/TestBasicLogOutput.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/serviceability/logging/TestDefaultLogOutput.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/logging/TestDefaultLogOutput.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/serviceability/logging/TestLogRotation.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/logging/TestLogRotation.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/logging/TestMultipleXlogArgs.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/logging/TestMultipleXlogArgs.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/serviceability/logging/TestQuotedLogOutputs.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/logging/TestQuotedLogOutputs.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/serviceability/sa/DeadlockDetectionTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/sa/DeadlockDetectionTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/sa/TestInstanceKlassSize.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/sa/TestInstanceKlassSize.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/sa/TestInstanceKlassSizeForInterface.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/sa/TestInstanceKlassSizeForInterface.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/sa/jmap-hashcode/Test8028623.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/sa/jmap-hashcode/Test8028623.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/sa/sadebugd/SADebugDTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/sa/sadebugd/SADebugDTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/serviceability/threads/TestFalseDeadLock.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/threads/TestFalseDeadLock.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/tmtools/jstack/DaemonThreadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstack/DaemonThreadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/tmtools/jstack/JstackThreadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstack/JstackThreadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/tmtools/jstack/SpreadLockTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstack/SpreadLockTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/tmtools/jstack/ThreadNamesTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstack/ThreadNamesTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/tmtools/jstack/TraveledLockTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstack/TraveledLockTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/serviceability/tmtools/jstat/GcCapacityTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstat/GcCapacityTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/serviceability/tmtools/jstat/GcCauseTest01.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstat/GcCauseTest01.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
--- a/test/serviceability/tmtools/jstat/GcCauseTest02.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstat/GcCauseTest02.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
--- a/test/serviceability/tmtools/jstat/GcCauseTest03.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstat/GcCauseTest03.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
--- a/test/serviceability/tmtools/jstat/GcNewTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstat/GcNewTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
 
--- a/test/serviceability/tmtools/jstat/GcTest01.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstat/GcTest01.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
--- a/test/serviceability/tmtools/jstat/GcTest02.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/serviceability/tmtools/jstat/GcTest02.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
  */
--- a/test/testlibrary/ClassFileInstaller.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +0,0 @@
-/*
- * 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.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.io.ByteArrayInputStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-/**
- * Dump a class file for a class on the class path in the current directory, or
- * in the specified JAR file. This class is usually used when you build a class
- * from a test library, but want to use this class in a sub-process.
- *
- * For example, to build the following library class:
- * test/lib/sun/hotspot/WhiteBox.java
- *
- * You would use the following tags:
- *
- * @library /test/lib
- * @build sun.hotspot.WhiteBox
- *
- * JTREG would build the class file under
- * ${JTWork}/classes/test/lib/sun/hotspot/WhiteBox.class
- *
- * With you run your main test class using "@run main MyMainClass", JTREG would setup the
- * -classpath to include "${JTWork}/classes/test/lib/", so MyMainClass would be able to
- * load the WhiteBox class.
- *
- * However, if you run a sub process, and do not wish to use the exact same -classpath,
- * You can use ClassFileInstaller to ensure that WhiteBox is available in the current
- * directory of your test:
- *
- * @run main ClassFileInstaller sun.hotspot.WhiteBox
- *
- * Or, you can use the -jar option to store the class in the specified JAR file. If a relative
- * path name is given, the JAR file would be relative to the current directory of
- *
- * @run main ClassFileInstaller -jar myjar.jar sun.hotspot.WhiteBox
- */
-public class ClassFileInstaller {
-    /**
-     * You can enable debug tracing of ClassFileInstaller by running JTREG with
-     * jtreg -DClassFileInstaller.debug=true ... <names of tests>
-     */
-    public static boolean DEBUG = Boolean.getBoolean("ClassFileInstaller.debug");
-
-    /**
-     * @param args The names of the classes to dump
-     * @throws Exception
-     */
-    public static void main(String... args) throws Exception {
-        if (args.length > 1 && args[0].equals("-jar")) {
-            if (args.length < 2) {
-                throw new RuntimeException("Usage: ClassFileInstaller <options> <classes>\n" +
-                                           "where possible options include:\n" +
-                                           "  -jar <path>             Write to the JAR file <path>");
-            }
-            writeJar(args[1], null, args, 2, args.length);
-        } else {
-            if (DEBUG) {
-                System.out.println("ClassFileInstaller: Writing to " + System.getProperty("user.dir"));
-            }
-            for (String arg : args) {
-                writeClassToDisk(arg);
-            }
-        }
-    }
-
-    public static class Manifest {
-        private InputStream in;
-
-        private Manifest(InputStream in) {
-            this.in = in;
-        }
-
-        static Manifest fromSourceFile(String fileName) throws Exception {
-            String pathName = System.getProperty("test.src") + File.separator + fileName;
-            return new Manifest(new FileInputStream(pathName));
-        }
-
-        // Example:
-        //  String manifest = "Premain-Class: RedefineClassHelper\n" +
-        //                "Can-Redefine-Classes: true\n";
-        //  ClassFileInstaller.writeJar("redefineagent.jar",
-        //    ClassFileInstaller.Manifest.fromString(manifest),
-        //    "RedefineClassHelper");
-        static Manifest fromString(String manifest) throws Exception {
-            return new Manifest(new ByteArrayInputStream(manifest.getBytes()));
-        }
-
-        public InputStream getInputStream() {
-            return in;
-        }
-    }
-
-    private static void writeJar(String jarFile, Manifest manifest, String classes[], int from, int to) throws Exception {
-        if (DEBUG) {
-            System.out.println("ClassFileInstaller: Writing to " + getJarPath(jarFile));
-        }
-
-        (new File(jarFile)).delete();
-        FileOutputStream fos = new FileOutputStream(jarFile);
-        ZipOutputStream zos = new ZipOutputStream(fos);
-
-        // The manifest must be the first or second entry. See comments in JarInputStream
-        // constructor and JDK-5046178.
-        if (manifest != null) {
-            writeToDisk(zos, "META-INF/MANIFEST.MF", manifest.getInputStream());
-        }
-
-        for (int i=from; i<to; i++) {
-            writeClassToDisk(zos, classes[i]);
-        }
-
-        zos.close();
-        fos.close();
-    }
-
-    /*
-     * You can call ClassFileInstaller.writeJar() from your main test class instead of
-     * using "@run ClassFileInstaller -jar ...". E.g.,
-     *
-     * String jarPath = ClassFileInstaller.getJarPath("myjar.jar", "sun.hotspot.WhiteBox")
-     *
-     * If you call this API, make sure you build ClassFileInstaller with the following tags:
-     *
-     * @library testlibrary
-     * @build ClassFileInstaller
-     */
-    public static String writeJar(String jarFile, String... classes) throws Exception {
-        writeJar(jarFile, null, classes, 0, classes.length);
-        return getJarPath(jarFile);
-    }
-
-    public static String writeJar(String jarFile, Manifest manifest, String... classes) throws Exception {
-        writeJar(jarFile, manifest, classes, 0, classes.length);
-        return getJarPath(jarFile);
-    }
-
-    /**
-     * This returns the absolute path to the file specified in "@ClassFileInstaller -jar myjar.jar",
-     * In your test program, instead of using the JAR file name directly:
-     *
-     * String jarPath = "myjar.jar";
-     *
-     * you should call this function, like:
-     *
-     * String jarPath = ClassFileInstaller.getJarPath("myjar.jar")
-     *
-     * The reasons are:
-     * (1) Using absolute path makes it easy to cut-and-paste from the JTR file and rerun your
-     *     test in any directory.
-     * (2) In the future, we may make the JAR file name unique to avoid clobbering
-     *     during parallel JTREG execution.
-     *
-     */
-    public static String getJarPath(String jarFileName) {
-        return new File(jarFileName).getAbsolutePath();
-    }
-
-    public static void writeClassToDisk(String className) throws Exception {
-        writeClassToDisk((ZipOutputStream)null, className);
-    }
-    private static void writeClassToDisk(ZipOutputStream zos, String className) throws Exception {
-        writeClassToDisk(zos, className, "");
-    }
-
-    public static void writeClassToDisk(String className, String prependPath) throws Exception {
-        writeClassToDisk(null, className, prependPath);
-    }
-    private static void writeClassToDisk(ZipOutputStream zos, String className, String prependPath) throws Exception {
-        ClassLoader cl = ClassFileInstaller.class.getClassLoader();
-
-        // Convert dotted class name to a path to a class file
-        String pathName = className.replace('.', '/').concat(".class");
-        InputStream is = cl.getResourceAsStream(pathName);
-        if (is == null) {
-            throw new RuntimeException("Failed to find " + pathName);
-        }
-        if (prependPath.length() > 0) {
-            pathName = prependPath + "/" + pathName;
-        }
-        writeToDisk(zos, pathName, is);
-    }
-
-    public static void writeClassToDisk(String className, byte[] bytecode) throws Exception {
-        writeClassToDisk(null, className, bytecode);
-    }
-    private static void writeClassToDisk(ZipOutputStream zos, String className, byte[] bytecode) throws Exception {
-        writeClassToDisk(zos, className, bytecode, "");
-    }
-
-    public static void writeClassToDisk(String className, byte[] bytecode, String prependPath) throws Exception {
-        writeClassToDisk(null, className, bytecode, prependPath);
-    }
-    private static void writeClassToDisk(ZipOutputStream zos, String className, byte[] bytecode, String prependPath) throws Exception {
-        // Convert dotted class name to a path to a class file
-        String pathName = className.replace('.', '/').concat(".class");
-        if (prependPath.length() > 0) {
-            pathName = prependPath + "/" + pathName;
-        }
-        writeToDisk(zos, pathName, new ByteArrayInputStream(bytecode));
-    }
-
-    private static void writeToDisk(ZipOutputStream zos, String pathName, InputStream is) throws Exception {
-        if (DEBUG) {
-            System.out.println("ClassFileInstaller: Writing " + pathName);
-        }
-        if (zos != null) {
-            ZipEntry ze = new ZipEntry(pathName);
-            zos.putNextEntry(ze);
-            byte[] buf = new byte[1024];
-            int len;
-            while ((len = is.read(buf))>0){
-                zos.write(buf, 0, len);
-            }
-        } else {
-            // Create the class file's package directory
-            Path p = Paths.get(pathName);
-            if (pathName.contains("/")) {
-                Files.createDirectories(p.getParent());
-            }
-            // Create the class file
-            Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING);
-        }
-        is.close();
-    }
-}
--- a/test/testlibrary/RedefineClassHelper.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2014, 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.
- */
-
-import java.io.PrintWriter;
-import java.lang.instrument.*;
-import jdk.test.lib.*;
-
-/*
- * Helper class to write tests that redefine classes.
- * When main method is run, it will create a redefineagent.jar that can be used
- * with the -javaagent option to support redefining classes in jtreg tests.
- *
- * See sample test in test/testlibrary_tests/RedefineClassTest.java
- */
-public class RedefineClassHelper {
-
-    public static Instrumentation instrumentation;
-    public static void premain(String agentArgs, Instrumentation inst) {
-        instrumentation = inst;
-    }
-
-    /**
-     * Redefine a class
-     *
-     * @param clazz Class to redefine
-     * @param javacode String with the new java code for the class to be redefined
-     */
-    public static void redefineClass(Class clazz, String javacode) throws Exception {
-        byte[] bytecode = InMemoryJavaCompiler.compile(clazz.getName(), javacode);
-        redefineClass(clazz, bytecode);
-    }
-
-    /**
-     * Redefine a class
-     *
-     * @param clazz Class to redefine
-     * @param bytecode byte[] with the new class
-     */
-    public static void redefineClass(Class clazz, byte[] bytecode) throws Exception {
-        instrumentation.redefineClasses(new ClassDefinition(clazz, bytecode));
-    }
-
-    /**
-     * Main method to be invoked before test to create the redefineagent.jar
-     */
-    public static void main(String[] args) throws Exception {
-        ClassFileInstaller.main("RedefineClassHelper");
-
-        PrintWriter pw = new PrintWriter("MANIFEST.MF");
-        pw.println("Premain-Class: RedefineClassHelper");
-        pw.println("Can-Redefine-Classes: true");
-        pw.close();
-
-        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", "RedefineClassHelper.class" })) {
-            throw new Exception("jar operation failed");
-        }
-    }
-}
--- a/test/testlibrary/jdk/test/lib/AllocationHelper.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* 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
-* 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.LinkedList;
-import java.util.concurrent.Callable;
-
-/**
- * Helper class which allocates memory.
- *
- * Typical usage:
- * <pre>
- * {@code
- *           AllocationHelper allocator = new AllocationHelper(MAX_ITERATIONS, ARRAY_LENGTH, CHUNK_SIZE,
- *                   () -> (verifier()));
- *           // Allocate byte[CHUNK_SIZE] ARRAY_LENGTH times. Total allocated bytes will be CHUNK_SIZE * ARRAY_LENGTH + refs length.
- *           // Then invoke verifier and iterate MAX_ITERATIONS times.
- *           allocator.allocateMemoryAndVerify();
- * }
- * </pre>
- */
-public final class AllocationHelper {
-
-    private final int arrayLength;
-    private final int maxIterations;
-    private final int chunkSize;
-
-    // garbageStorage is used to store link to garbage to prevent optimization.
-    private static Object garbageStorage;
-    private byte garbage[][];
-    private final Callable<?> verifierInstance;
-
-    /**
-     * Create an AllocationHelper with specified iteration count, array length, chunk size and verifier.
-     *
-     * @param maxIterations
-     * @param arrayLength
-     * @param chunkSize
-     * @param verifier - Callable instance which will be invoked after all allocation cycle. Can be null;
-     */
-    public AllocationHelper(int maxIterations, int arrayLength, int chunkSize, Callable<?> verifier) {
-        if ((arrayLength <= 0) || (maxIterations <= 0) || (chunkSize <= 0)) {
-            throw new IllegalArgumentException("maxIterations, arrayLength and chunkSize should be greater then 0.");
-        }
-        this.arrayLength = arrayLength;
-        this.maxIterations = maxIterations;
-        this.chunkSize = chunkSize;
-        verifierInstance = verifier;
-        garbage = new byte[this.arrayLength][];
-        garbageStorage = garbage;
-    }
-
-    private void allocateMemoryOneIteration() {
-        for (int j = 0; j < arrayLength; j++) {
-            garbage[j] = new byte[chunkSize];
-        }
-    }
-
-    /**
-     * Allocate memory and invoke Verifier during all iteration.
-     *
-     * @throws java.lang.Exception
-     */
-    public void allocateMemoryAndVerify() throws Exception {
-        for (int i = 0; i < maxIterations; i++) {
-            allocateMemoryOneIteration();
-            if (verifierInstance != null) {
-                verifierInstance.call();
-            }
-        }
-    }
-
-    /**
-     * The same as allocateMemoryAndVerify() but hides OOME
-     *
-     * @throws Exception
-     */
-    public void allocateMemoryAndVerifyNoOOME() throws Exception {
-        try {
-            allocateMemoryAndVerify();
-        } catch (OutOfMemoryError e) {
-            // exit on OOME
-        }
-    }
-
-    /**
-     * Release link to allocated garbage to make it available for further GC
-     */
-    public void release() {
-        if (garbage != null) {
-            garbage = null;
-            garbageStorage = null;
-        }
-    }
-}
--- a/test/testlibrary/jdk/test/lib/Asserts.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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) + ")";
-    }
-}
-
--- a/test/testlibrary/jdk/test/lib/BuildHelper.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2014, 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.File;
-import java.io.FileReader;
-import java.util.Properties;
-
-public class BuildHelper {
-
-    /**
-     * Commercial builds should have the BUILD_TYPE set to commercial
-     * within the release file, found at the root of the JDK.
-     */
-    public static boolean isCommercialBuild() throws Exception {
-        String buildType = getReleaseProperty("BUILD_TYPE","notFound");
-        return buildType.equals("commercial");
-    }
-
-
-    /**
-     * Return the value for property key, or defaultValue if no property not found.
-     * If present, double quotes are trimmed.
-     */
-    public static String getReleaseProperty(String key, String defaultValue) throws Exception {
-        Properties properties = getReleaseProperties();
-        String value = properties.getProperty(key, defaultValue);
-        return trimDoubleQuotes(value);
-    }
-
-    /**
-     * Return the value for property key, or null if no property not found.
-     * If present, double quotes are trimmed.
-     */
-    public static String getReleaseProperty(String key) throws Exception {
-        return getReleaseProperty(key, null);
-    }
-
-    /**
-     * Get properties from the release file
-     */
-    public static Properties getReleaseProperties() throws Exception {
-        Properties properties = new Properties();
-        properties.load(new FileReader(getReleaseFile()));
-        return properties;
-    }
-
-    /**
-     * Every JDK has a release file in its root.
-     * @return A handler to the release file.
-     */
-    public static File getReleaseFile() throws Exception {
-        String jdkPath = getJDKRoot();
-        File releaseFile = new File(jdkPath,"release");
-        if ( ! releaseFile.canRead() ) {
-            throw new Exception("Release file is not readable, or it is absent: " +
-                    releaseFile.getCanonicalPath());
-        }
-        return releaseFile;
-    }
-
-    /**
-     * Returns path to the JDK under test.
-     * This path is obtained through the test.jdk property, usually set by JTREG.
-     */
-    public static String getJDKRoot() {
-        String jdkPath = System.getProperty("test.jdk");
-        if (jdkPath == null) {
-            throw new RuntimeException("System property 'test.jdk' not set. This property is normally set by jtreg. "
-                    + "When running test separately, set this property using '-Dtest.jdk=/path/to/jdk'.");
-        }
-        return jdkPath;
-    }
-
-    /**
-     * Trim double quotes from the beginning and the end of the given string.
-     * @param original string to trim.
-     * @return a new trimmed string.
-     */
-    public static String trimDoubleQuotes(String original) {
-        if (original == null) { return null; }
-        String trimmed = original.replaceAll("^\"+|\"+$", "");
-        return trimmed;
-    }
-}
--- a/test/testlibrary/jdk/test/lib/ByteCodeLoader.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +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.security.SecureClassLoader;
-
-/**
- * {@code ByteCodeLoader} can be used for easy loading of byte code already
- * present in memory.
- *
- * {@code InMemoryCompiler} can be used for compiling source code in a string
- * into byte code, which then can be loaded with {@code ByteCodeLoader}.
- *
- * @see InMemoryCompiler
- */
-public class ByteCodeLoader extends SecureClassLoader {
-    private final String className;
-    private final byte[] byteCode;
-    private volatile Class<?> holder;
-
-    /**
-     * Creates a new {@code ByteCodeLoader} ready to load a class with the
-     * given name and the given byte code.
-     *
-     * @param className The name of the class
-     * @param byteCode The byte code of the class
-     */
-    public ByteCodeLoader(String className, byte[] byteCode) {
-        this.className = className;
-        this.byteCode = byteCode;
-    }
-
-    @Override
-    public Class<?> loadClass(String name) throws ClassNotFoundException {
-        if (!name.equals(className)) {
-            return super.loadClass(name);
-        }
-        if (holder == null) {
-            synchronized(this) {
-                if (holder == null) {
-                    holder = findClass(name);
-                }
-            }
-        }
-        return holder;
-    }
-
-    @Override
-    protected Class<?> findClass(String name) throws ClassNotFoundException {
-        if (!name.equals(className)) {
-            throw new ClassNotFoundException(name);
-        }
-
-        return defineClass(name, byteCode, 0, byteCode.length);
-    }
-
-    /**
-     * Utility method for creating a new {@code ByteCodeLoader} and then
-     * directly load the given byte code.
-     *
-     * @param className The name of the class
-     * @param byteCode The byte code for the class
-     * @throws ClassNotFoundException if the class can't be loaded
-     * @return A {@see Class} object representing the class
-     */
-    public static Class<?> load(String className, byte[] byteCode) throws ClassNotFoundException {
-        return new ByteCodeLoader(className, byteCode).loadClass(className);
-    }
-}
--- a/test/testlibrary/jdk/test/lib/DynamicVMOption.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2014, 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 com.sun.management.HotSpotDiagnosticMXBean;
-import java.lang.management.ManagementFactory;
-
-/**
- * A utility class to work with VM options which could be altered during
- * execution.
- *
- * This class is a wrapper around {@code com.sun.management.VMOption}.
- * It provides more convenient interface to read/write the values.
- *
- */
-public class DynamicVMOption {
-
-    private final HotSpotDiagnosticMXBean mxBean;
-
-    /**
-     * VM option name, like "MinHeapFreeRatio".
-     */
-    public final String name;
-
-    /**
-     * Creates an instance of DynamicVMOption.
-     *
-     * @param name the VM option name
-     */
-    public DynamicVMOption(String name) {
-        this.name = name;
-        mxBean = ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class);
-    }
-
-    /**
-     * Sets a new value for the option.
-     * Trying to set not applicable value will cause IllegalArgumentException.
-     * Behavior with null is undefined, most likely NPE will be thrown.
-     *
-     * @param newValue the value to be set
-     * @see #getValue()
-     * @throws IllegalArgumentException if newValue is not applicable to the option
-     */
-    public final void setValue(String newValue) {
-        mxBean.setVMOption(name, newValue);
-    }
-
-    /**
-     * Returns the value of option.
-     *
-     * @return the current option value
-     * @see #setValue(java.lang.String)
-     */
-    public final String getValue() {
-        return mxBean.getVMOption(name).getValue();
-    }
-
-    /**
-     * Returns true, if option is writable, false otherwise.
-     *
-     * @return true, if option is writable, false otherwise
-     */
-    public final boolean isWriteable() {
-        return mxBean.getVMOption(name).isWriteable();
-    }
-
-    /**
-     * Checks if the given value is applicable for the option.
-     *
-     * This method tries to set the option to the new value. If no exception
-     * has been thrown the value is treated as valid.
-     *
-     * Calling this method will not change the option value. After an attempt
-     * to set a new value, the option will be restored to its previous value.
-     *
-     * @param value the value to verify
-     * @return true if option could be set to the given value
-     */
-    public boolean isValidValue(String value) {
-        boolean isValid = true;
-        String oldValue = getValue();
-        try {
-            setValue(value);
-        } catch (NullPointerException e) {
-            if (value == null) {
-                isValid = false;
-            }
-        } catch (IllegalArgumentException e) {
-            isValid = false;
-        } finally {
-            setValue(oldValue);
-        }
-        return isValid;
-    }
-
-    /**
-     * Returns the value of the given VM option as String.
-     *
-     * This is a simple shortcut for {@code new DynamicVMOption(name).getValue()}
-     *
-     * @param name the name of VM option
-     * @return value as a string
-     * @see #getValue()
-     */
-    public static String getString(String name) {
-        return new DynamicVMOption(name).getValue();
-    }
-
-    /**
-     * Returns the value of the given option as int.
-     *
-     * @param name the name of VM option
-     * @return value parsed as integer
-     * @see #getString(java.lang.String)
-     *
-     */
-    public static int getInt(String name) {
-        return Integer.parseInt(getString(name));
-    }
-
-    /**
-     * Sets the VM option to a new value.
-     *
-     * This is a simple shortcut for {@code new DynamicVMOption(name).setValue(value)}
-     *
-     * @param name the name of VM option
-     * @param value the value to be set
-     * @see #setValue(java.lang.String)
-     */
-    public static void setString(String name, String value) {
-        new DynamicVMOption(name).setValue(value);
-    }
-
-    /**
-     * Sets the VM option value to a new integer value.
-     *
-     * @param name the name of VM option
-     * @param value the integer value to be set
-     * @see #setString(java.lang.String, java.lang.String)
-     */
-    public static void setInt(String name, int value) {
-        new DynamicVMOption(name).setValue(Integer.toString(value));
-    }
-
-}
--- a/test/testlibrary/jdk/test/lib/ExitCode.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2014, 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;
-
-/**
- * Exit code values that could be returned by the JVM.
- */
-public enum ExitCode {
-    OK(0),
-    FAIL(1),
-    CRASH(134);
-
-    public final int value;
-
-    ExitCode(int value) {
-        this.value = value;
-    }
-}
-
--- a/test/testlibrary/jdk/test/lib/FileInstaller.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * 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
- * 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.IOException;
-import java.nio.file.FileVisitResult;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.SimpleFileVisitor;
-import java.nio.file.StandardCopyOption;
-import java.nio.file.attribute.BasicFileAttributes;
-
-/**
- * Copy a resource: file or directory recursively, using relative path(src and dst)
- * which are applied to test source directory(src) and current directory(dst)
- */
-public class FileInstaller {
-    /**
-     * @param args source and destination
-     * @throws IOException if an I/O error occurs
-     */
-    public static void main(String[] args) throws IOException {
-        if (args.length != 2) {
-            throw new IllegalArgumentException("Unexpected number of arguments for file copy");
-        }
-        Path src = Paths.get(Utils.TEST_SRC, args[0]).toAbsolutePath();
-        Path dst = Paths.get(args[1]).toAbsolutePath();
-        if (src.toFile().exists()) {
-            if (src.toFile().isDirectory()) {
-                Files.walkFileTree(src, new CopyFileVisitor(src, dst));
-            } else {
-                Path dstDir = dst.getParent();
-                if (!dstDir.toFile().exists()) {
-                    Files.createDirectories(dstDir);
-                }
-                Files.copy(src, dst, StandardCopyOption.REPLACE_EXISTING);
-            }
-        } else {
-            throw new IOException("Can't find source " + src);
-        }
-    }
-
-    private static class CopyFileVisitor extends SimpleFileVisitor<Path> {
-        private final Path copyFrom;
-        private final Path copyTo;
-
-        public CopyFileVisitor(Path copyFrom, Path copyTo) {
-            this.copyFrom = copyFrom;
-            this.copyTo = copyTo;
-        }
-
-        @Override
-        public FileVisitResult preVisitDirectory(Path file,
-                BasicFileAttributes attrs) throws IOException {
-            Path relativePath = file.relativize(copyFrom);
-            Path destination = copyTo.resolve(relativePath);
-            if (!destination.toFile().exists()) {
-                Files.createDirectories(destination);
-            }
-            return FileVisitResult.CONTINUE;
-        }
-
-        @Override
-        public FileVisitResult visitFile(Path file,
-                BasicFileAttributes attrs) throws IOException {
-            if (!file.toFile().isFile()) {
-                return FileVisitResult.CONTINUE;
-            }
-            Path relativePath = copyFrom.relativize(file);
-            Path destination = copyTo.resolve(relativePath);
-            Files.copy(file, destination, StandardCopyOption.COPY_ATTRIBUTES);
-            return FileVisitResult.CONTINUE;
-        }
-    }
-}
--- a/test/testlibrary/jdk/test/lib/HeapRegionUsageTool.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* 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
-* 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.lang.management.ManagementFactory;
-import java.lang.management.MemoryPoolMXBean;
-import java.lang.management.MemoryUsage;
-
-/**
- * Utility class used by tests to get heap region usage.
- */
-public final class HeapRegionUsageTool {
-
-    /**
-     * Get MemoryUsage from MemoryPoolMXBean which name matches passed string.
-     *
-     * @param name
-     * @return MemoryUsage
-     */
-    private static MemoryUsage getUsage(String name){
-        for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) {
-            if (pool.getName().matches(name)) {
-                return pool.getUsage();
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Get MemoryUsage of Eden space.
-     *
-     * @return MemoryUsage
-     */
-    public static MemoryUsage getEdenUsage() {
-        return getUsage(".*Eden.*");
-    }
-
-    /**
-     * Get MemoryUsage of Survivor space.
-     *
-     * @return MemoryUsage
-     */
-    public static MemoryUsage getSurvivorUsage() {
-        return getUsage(".*Survivor.*");
-    }
-
-    /**
-     * Get memory usage of Tenured space
-     *
-     * @return MemoryUsage
-     */
-    public static MemoryUsage getOldUsage() {
-        return getUsage(".*(Old|Tenured).*");
-    }
-
-    /**
-     * Get heap usage.
-     *
-     * @return MemoryUsage
-     */
-    public static MemoryUsage getHeapUsage() {
-        return ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
-    }
-
-    /**
-     * Helper function to align up.
-     *
-     * @param value
-     * @param alignment
-     * @return aligned value
-     */
-    public static long alignUp(long value, long alignment) {
-        return (value + alignment - 1) & ~(alignment - 1);
-    }
-
-    /**
-     * Helper function to align down.
-     *
-     * @param value
-     * @param alignment
-     * @return aligned value
-     */
-    public static long alignDown(long value, long alignment) {
-        return value & ~(alignment - 1);
-    }
-}
--- a/test/testlibrary/jdk/test/lib/InMemoryJavaCompiler.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +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.io.OutputStream;
-
-import java.net.URI;
-import java.util.Arrays;
-
-import javax.tools.ForwardingJavaFileManager;
-import javax.tools.FileObject;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaCompiler.CompilationTask;
-import javax.tools.JavaFileObject;
-import javax.tools.JavaFileObject.Kind;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.ToolProvider;
-
-/**
- * {@code InMemoryJavaCompiler} can be used for compiling a {@link
- * CharSequence} to a {@code byte[]}.
- *
- * The compiler will not use the file system at all, instead using a {@link
- * ByteArrayOutputStream} for storing the byte code. For the source code, any
- * kind of {@link CharSequence} can be used, e.g. {@link String}, {@link
- * StringBuffer} or {@link StringBuilder}.
- *
- * The {@code InMemoryCompiler} can easily be used together with a {@code
- * ByteClassLoader} to easily compile and load source code in a {@link String}:
- *
- * <pre>
- * {@code
- * import jdk.test.lib.InMemoryJavaCompiler;
- * import jdk.test.lib.ByteClassLoader;
- *
- * class Example {
- *     public static void main(String[] args) {
- *         String className = "Foo";
- *         String sourceCode = "public class " + className + " {" +
- *                             "    public void bar() {" +
- *                             "        System.out.println("Hello from bar!");" +
- *                             "    }" +
- *                             "}";
- *         byte[] byteCode = InMemoryJavaCompiler.compile(className, sourceCode);
- *         Class fooClass = ByteClassLoader.load(className, byteCode);
- *     }
- * }
- * }
- * </pre>
- */
-public class InMemoryJavaCompiler {
-    private static class MemoryJavaFileObject extends SimpleJavaFileObject {
-        private final String className;
-        private final CharSequence sourceCode;
-        private final ByteArrayOutputStream byteCode;
-
-        public MemoryJavaFileObject(String className, CharSequence sourceCode) {
-            super(URI.create("string:///" + className.replace('.','/') + Kind.SOURCE.extension), Kind.SOURCE);
-            this.className = className;
-            this.sourceCode = sourceCode;
-            this.byteCode = new ByteArrayOutputStream();
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return sourceCode;
-        }
-
-        @Override
-        public OutputStream openOutputStream() throws IOException {
-            return byteCode;
-        }
-
-        public byte[] getByteCode() {
-            return byteCode.toByteArray();
-        }
-
-        public String getClassName() {
-            return className;
-        }
-    }
-
-    private static class FileManagerWrapper extends ForwardingJavaFileManager {
-        private MemoryJavaFileObject file;
-
-        public FileManagerWrapper(MemoryJavaFileObject file) {
-            super(getCompiler().getStandardFileManager(null, null, null));
-            this.file = file;
-        }
-
-        @Override
-        public JavaFileObject getJavaFileForOutput(Location location, String className,
-                                                   Kind kind, FileObject sibling)
-            throws IOException {
-            if (!file.getClassName().equals(className)) {
-                throw new IOException("Expected class with name " + file.getClassName() +
-                                      ", but got " + className);
-            }
-            return file;
-        }
-    }
-
-    /**
-     * Compiles the class with the given name and source code.
-     *
-     * @param className The name of the class
-     * @param sourceCode The source code for the class with name {@code className}
-     * @param options additional command line options
-     * @throws RuntimeException if the compilation did not succeed
-     * @return The resulting byte code from the compilation
-     */
-    public static byte[] compile(String className, CharSequence sourceCode, String... options) {
-        MemoryJavaFileObject file = new MemoryJavaFileObject(className, sourceCode);
-        CompilationTask task = getCompilationTask(file, options);
-
-        if(!task.call()) {
-            throw new RuntimeException("Could not compile " + className + " with source code " + sourceCode);
-        }
-
-        return file.getByteCode();
-    }
-
-    private static JavaCompiler getCompiler() {
-        return ToolProvider.getSystemJavaCompiler();
-    }
-
-    private static CompilationTask getCompilationTask(MemoryJavaFileObject file, String... options) {
-        return getCompiler().getTask(null, new FileManagerWrapper(file), null, Arrays.asList(options), null, Arrays.asList(file));
-    }
-}
--- a/test/testlibrary/jdk/test/lib/InfiniteLoop.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2014, 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.Objects;
-
-/**
- * Class which runs another Runnable in infinite loop with certain pauses
- * between cycles.
- */
-public class InfiniteLoop implements Runnable {
-    private final Runnable target;
-    private final long mills;
-
-
-    /**
-     * @param target a target to run in a loop
-     * @param mills  the length of pause time in milliseconds
-     * @throws NullPointerException if target is null
-     * @throws IllegalArgumentException if the value of millis is negative
-     */
-    public InfiniteLoop(Runnable target, long mills) {
-        Objects.requireNonNull(target);
-        if (mills < 0) {
-            throw new IllegalArgumentException("mills < 0");
-        }
-        this.target = target;
-        this.mills = mills;
-    }
-
-    @Override
-    public void run() {
-        try {
-            while (true) {
-                target.run();
-                if (mills > 0) {
-                    Thread.sleep(mills);
-                }
-            }
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            throw new Error(e);
-        }
-    }
-}
--- a/test/testlibrary/jdk/test/lib/InputArguments.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +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.lang.management.RuntimeMXBean;
-import java.lang.management.ManagementFactory;
-import java.util.List;
-
-/**
- * This class provides access to the input arguments to the VM.
- */
-public class InputArguments {
-    private static final List<String> args;
-
-    static {
-        RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
-        args = runtimeMxBean.getInputArguments();
-    }
-
-    /**
-     * Returns true if {@code arg} is an input argument to the VM.
-     *
-     * This is useful for checking boolean flags such as -XX:+UseSerialGC or
-     * -XX:-UsePerfData.
-     *
-     * @param arg The name of the argument.
-     * @return {@code true} if the given argument is an input argument,
-     *         otherwise {@code false}.
-     */
-    public static boolean contains(String arg) {
-        return args.contains(arg);
-    }
-
-    /**
-     * Returns true if {@code prefix} is the start of an input argument to the
-     * VM.
-     *
-     * This is useful for checking if flags describing a quantity, such as
-     * -XX:+MaxMetaspaceSize=100m, is set without having to know the quantity.
-     * To check if the flag -XX:MaxMetaspaceSize is set, use
-     * {@code InputArguments.containsPrefix("-XX:MaxMetaspaceSize")}.
-     *
-     * @param prefix The start of the argument.
-     * @return {@code true} if the given argument is the start of an input
-     *         argument, otherwise {@code false}.
-     */
-    public static boolean containsPrefix(String prefix) {
-        for (String arg : args) {
-            if (arg.startsWith(prefix)) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
--- a/test/testlibrary/jdk/test/lib/JDKToolFinder.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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();
-    }
-}
--- a/test/testlibrary/jdk/test/lib/JDKToolLauncher.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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()]);
-    }
-}
--- a/test/testlibrary/jdk/test/lib/OutputAnalyzer.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,440 +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.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.
-   *
-   * @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();
-    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
-   */
-  public 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)"));
-  }
-}
--- a/test/testlibrary/jdk/test/lib/OutputBuffer.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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;
-  }
-}
--- a/test/testlibrary/jdk/test/lib/Pair.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
- * 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
- * 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.Objects;
-
-/**
- * Pair - a two element tuple
- *
- * @param <F> first type
- * @param <S> second type
- */
-public class Pair<F, S> {
-    public final F first;
-    public final S second;
-
-    public Pair(F first, S second) {
-        this.first = first;
-        this.second = second;
-    }
-
-    @Override
-    public String toString() {
-        return "(" + first + ":" + second + ")";
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other instanceof Pair<?, ?>) {
-            Pair<?, ?> otherPair = (Pair<?, ?>) other;
-            return Objects.equals(first, otherPair.first) &&
-                    Objects.equals(second, otherPair.second);
-        }
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        if (first == null) {
-            return (second == null) ? 0 : second.hashCode();
-        } else if (second == null) {
-            return first.hashCode();
-        } else {
-            return first.hashCode() * 17 + second.hashCode();
-        }
-    }
-}
--- a/test/testlibrary/jdk/test/lib/Platform.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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";
-    }
-}
--- a/test/testlibrary/jdk/test/lib/ProcessTools.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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();
-  }
-}
--- a/test/testlibrary/jdk/test/lib/StreamPumper.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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();
-      }
-    }
-  }
-}
--- a/test/testlibrary/jdk/test/lib/TimeLimitedRunner.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, 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.Objects;
-import java.util.concurrent.Callable;
-
-/**
- * Auxiliary class to run target w/ given timeout.
- */
-public class TimeLimitedRunner implements Callable<Void> {
-    private final long              stoptime;
-    private final long              timeout;
-    private final double            factor;
-    private final Callable<Boolean> target;
-
-    /**
-     * @param timeout   a timeout. zero means no time limitation
-     * @param factor    a multiplier used to estimate next iteration time
-     * @param target    a target to run
-     * @throws NullPointerException     if target is null
-     * @throws IllegalArgumentException if timeout is negative or
-                                        factor isn't positive
-     */
-    public TimeLimitedRunner(long timeout, double factor,
-            Callable<Boolean> target) {
-        Objects.requireNonNull(target, "target must not be null");
-        if (timeout < 0) {
-            throw new IllegalArgumentException("timeout[" + timeout + "] < 0");
-        }
-        if (factor <= 0d) {
-            throw new IllegalArgumentException("factor[" + factor + "] <= 0");
-        }
-        this.stoptime = System.currentTimeMillis() + timeout;
-        this.timeout = timeout;
-        this.factor = factor;
-        this.target = target;
-    }
-
-    /**
-     * Runs @{linkplan target} while it returns true and timeout isn't exceeded
-     */
-    @Override
-    public Void call() throws Exception {
-        long maxDuration = 0L;
-        long iterStart = System.currentTimeMillis();
-        if (timeout != 0 && iterStart > stoptime) {
-            return null;
-        }
-        while (target.call()) {
-            if (timeout != 0) {
-                long iterDuration = System.currentTimeMillis() - iterStart;
-                maxDuration = Math.max(maxDuration, iterDuration);
-                iterStart = System.currentTimeMillis();
-                if (iterStart + (maxDuration * factor) > stoptime) {
-                    System.out.println("Not enough time to continue execution. "
-                            + "Interrupted.");
-                    break;
-                }
-            }
-        }
-        return null;
-    }
-
-}
--- a/test/testlibrary/jdk/test/lib/Triple.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * 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
- * 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.Objects;
-
-/**
- * Triple - a three element tuple
- *
- * @param <F> first element type
- * @param <S> second element type
- * @param <T> third element type
- */
-public class Triple<F, S, T> {
-    private final Pair<F, Pair<S, T>> container;
-
-    /**
-     * Constructor
-     *
-     * @param first  first element of the triple
-     * @param second second element of the triple
-     * @param third  third element of the triple
-     */
-    public Triple(F first, S second, T third) {
-        container = new Pair<>(first, new Pair<>(second, third));
-    }
-
-    /**
-     * Gets first element of the triple
-     */
-    public F getFirst() {
-        return container.first;
-    }
-
-    /**
-     * Gets second element of the triple
-     */
-    public S getSecond() {
-        return container.second.first;
-    }
-
-    /**
-     * Gets third element of the triple
-     */
-    public T getThird() {
-        return container.second.second;
-    }
-
-    @Override
-    public int hashCode() {
-        return container.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof Triple<?, ?, ?>) {
-            Triple<?, ?, ?> objTriple = (Triple<?, ?, ?>) obj;
-            return Objects.equals(container.first, objTriple.container.first)
-                    && Objects.equals(container.second,
-                    objTriple.container.second);
-        }
-        return false;
-    }
-
-    @Override
-    public String toString() {
-        return "(" + getFirst() + " : " + getSecond() + " : " + getThird() + ")";
-    }
-}
--- a/test/testlibrary/jdk/test/lib/Utils.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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;
-    }
-}
-
--- a/test/testlibrary/jdk/test/lib/cli/CPUSpecificCommandLineOptionTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2014, 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.cli;
-
-import jdk.test.lib.cli.predicate.CPUSpecificPredicate;
-
-/**
- * Base class for command line options tests that
- * requires specific CPU arch or specific CPU features.
- */
-public abstract class CPUSpecificCommandLineOptionTest
-        extends CommandLineOptionTest {
-    /**
-     * Creates new CPU specific test instance that does not
-     * require any CPU features.
-     *
-     * @param cpuArchPattern Regular expression that should
-     *                       match os.arch.
-     */
-    public CPUSpecificCommandLineOptionTest(String cpuArchPattern) {
-        this(cpuArchPattern, null, null);
-    }
-
-    /**
-     * Creates new CPU specific test instance that does not
-     * require from CPU support of {@code supportedCPUFeatures} features
-     * and no support of {@code unsupportedCPUFeatures}.
-     *
-     * @param cpuArchPattern Regular expression that should
-     *                       match os.arch.
-     * @param supportedCPUFeatures Array with names of features that
-     *                             should be supported by CPU. If {@code null},
-     *                             then no features have to be supported.
-     * @param unsupportedCPUFeatures Array with names of features that
-     *                               should not be supported by CPU.
-     *                               If {@code null}, then CPU may support any
-     *                               features.
-     */
-    public CPUSpecificCommandLineOptionTest(String cpuArchPattern,
-            String supportedCPUFeatures[], String unsupportedCPUFeatures[]) {
-        super(new CPUSpecificPredicate(cpuArchPattern, supportedCPUFeatures,
-                unsupportedCPUFeatures));
-    }
-}
--- a/test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,520 +0,0 @@
-/*
- * Copyright (c) 2014, 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.cli;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.function.BooleanSupplier;
-
-import jdk.test.lib.*;
-
-/**
- * Base class for command line option tests.
- */
-public abstract class CommandLineOptionTest {
-    public static final String UNLOCK_DIAGNOSTIC_VM_OPTIONS
-            = "-XX:+UnlockDiagnosticVMOptions";
-    public static final String UNLOCK_EXPERIMENTAL_VM_OPTIONS
-            = "-XX:+UnlockExperimentalVMOptions";
-    protected static final String UNRECOGNIZED_OPTION_ERROR_FORMAT
-            = "Unrecognized VM option '[+-]?%s(=.*)?'";
-    protected static final String EXPERIMENTAL_OPTION_ERROR_FORMAT
-            = "VM option '%s' is experimental and must be enabled via "
-            + "-XX:\\+UnlockExperimentalVMOptions.";
-    protected static final String DIAGNOSTIC_OPTION_ERROR_FORMAT
-            = " VM option '%s' is diagnostic and must be enabled via "
-            + "-XX:\\+UnlockDiagnosticVMOptions.";
-    private static final String PRINT_FLAGS_FINAL_FORMAT = "%s\\s*:?=\\s*%s";
-
-    /**
-     * Verifies that JVM startup behavior matches our expectations.
-     *
-     * @param option an option that should be passed to JVM
-     * @param expectedMessages an array of patterns that should occur
-     *                          in JVM output. If {@code null} then
-     *                          JVM output could be empty.
-     * @param unexpectedMessages an array of patterns that should not
-     *                           occur in JVM output. If {@code null} then
-     *                           JVM output could be empty.
-     * @param exitErrorMessage message that will be shown if exit code is not
-     *                           as expected.
-     * @param wrongWarningMessage message that will be shown if warning
-     *                           messages are not as expected.
-     * @param exitCode expected exit code.
-     * @throws Throwable if verification fails or some other issues occur.
-     */
-    public static void verifyJVMStartup(String option,
-            String expectedMessages[], String unexpectedMessages[],
-            String exitErrorMessage, String wrongWarningMessage,
-            ExitCode exitCode) throws Throwable {
-        CommandLineOptionTest.verifyJVMStartup(expectedMessages,
-                unexpectedMessages, exitErrorMessage,
-                wrongWarningMessage, exitCode, false, option);
-    }
-
-    /**
-     * Verifies that JVM startup behavior matches our expectations.
-     *
-     * @param expectedMessages an array of patterns that should occur
-     *                         in JVM output. If {@code null} then
-     *                         JVM output could be empty.
-     * @param unexpectedMessages an array of patterns that should not
-     *                           occur in JVM output. If {@code null} then
-     *                           JVM output could be empty.
-     * @param exitErrorMessage message that will be shown if exit code is not
-     *                           as expected.
-     * @param wrongWarningMessage message that will be shown if warning
-     *                           messages are not as expected.
-     * @param exitCode expected exit code.
-     * @param addTestVMOptions if {@code true} then test VM options will be
-     *                         passed to VM.
-     * @param options options that should be passed to VM in addition to mode
-     *                flag.
-     * @throws Throwable if verification fails or some other issues occur.
-     */
-    public static void verifyJVMStartup(String expectedMessages[],
-            String unexpectedMessages[], String exitErrorMessage,
-            String wrongWarningMessage, ExitCode exitCode,
-            boolean addTestVMOptions, String... options)
-                    throws Throwable {
-        List<String> finalOptions = new ArrayList<>();
-        if (addTestVMOptions) {
-            Collections.addAll(finalOptions, ProcessTools.getVmInputArgs());
-            Collections.addAll(finalOptions, Utils.getTestJavaOpts());
-        }
-        Collections.addAll(finalOptions, options);
-        finalOptions.add("-version");
-
-        ProcessBuilder processBuilder
-                = ProcessTools.createJavaProcessBuilder(finalOptions.toArray(
-                new String[finalOptions.size()]));
-        OutputAnalyzer outputAnalyzer
-                = new OutputAnalyzer(processBuilder.start());
-
-        try {
-                outputAnalyzer.shouldHaveExitValue(exitCode.value);
-        } catch (RuntimeException e) {
-            String errorMessage = String.format(
-                    "JVM process should have exit value '%d'.%n%s",
-                    exitCode.value, exitErrorMessage);
-            throw new AssertionError(errorMessage, e);
-        }
-
-        verifyOutput(expectedMessages, unexpectedMessages,
-                wrongWarningMessage, outputAnalyzer);
-    }
-
-    /**
-     * Verifies that JVM startup behavior matches our expectations.
-     *
-     * @param expectedMessages an array of patterns that should occur in JVM
-     *                         output. If {@code null} then
-     *                         JVM output could be empty.
-     * @param unexpectedMessages an array of patterns that should not occur
-     *                           in JVM output. If {@code null} then
-     *                           JVM output could be empty.
-     * @param wrongWarningMessage message that will be shown if messages are
-     *                            not as expected.
-     * @param outputAnalyzer OutputAnalyzer instance
-     * @throws AssertionError if verification fails.
-     */
-    public static void verifyOutput(String[] expectedMessages,
-            String[] unexpectedMessages, String wrongWarningMessage,
-            OutputAnalyzer outputAnalyzer) {
-        if (expectedMessages != null) {
-            for (String expectedMessage : expectedMessages) {
-                try {
-                    outputAnalyzer.shouldMatch(expectedMessage);
-                } catch (RuntimeException e) {
-                    String errorMessage = String.format(
-                            "Expected message not found: '%s'.%n%s",
-                            expectedMessage, wrongWarningMessage);
-                    throw new AssertionError(errorMessage, e);
-                }
-            }
-        }
-
-        if (unexpectedMessages != null) {
-            for (String unexpectedMessage : unexpectedMessages) {
-                try {
-                    outputAnalyzer.shouldNotMatch(unexpectedMessage);
-                } catch (RuntimeException e) {
-                    String errorMessage = String.format(
-                            "Unexpected message found: '%s'.%n%s",
-                            unexpectedMessage, wrongWarningMessage);
-                    throw new AssertionError(errorMessage, e);
-                }
-            }
-        }
-    }
-
-    /**
-     * Verifies that JVM startup behavior matches our expectations when type
-     * of newly started VM is the same as the type of current.
-     *
-     * @param expectedMessages an array of patterns that should occur
-     *                         in JVM output. If {@code null} then
-     *                         JVM output could be empty.
-     * @param unexpectedMessages an array of patterns that should not
-     *                           occur in JVM output. If {@code null} then
-     *                           JVM output could be empty.
-     * @param exitErrorMessage Message that will be shown if exit value is not
-     *                           as expected.
-     * @param wrongWarningMessage message that will be shown if warning
-     *                           messages are not as expected.
-     * @param exitCode expected exit code.
-     * @param options options that should be passed to VM in addition to mode
-     *                flag.
-     * @throws Throwable if verification fails or some other issues occur.
-     */
-    public static void verifySameJVMStartup(String expectedMessages[],
-            String unexpectedMessages[], String exitErrorMessage,
-            String wrongWarningMessage, ExitCode exitCode, String... options)
-            throws Throwable {
-        List<String> finalOptions = new ArrayList<>();
-        finalOptions.add(CommandLineOptionTest.getVMTypeOption());
-        Collections.addAll(finalOptions, options);
-
-        CommandLineOptionTest.verifyJVMStartup(expectedMessages,
-                unexpectedMessages, exitErrorMessage,
-                wrongWarningMessage, exitCode, false,
-                finalOptions.toArray(new String[finalOptions.size()]));
-    }
-
-    /**
-     * Verifies that value of specified JVM option is the same as
-     * expected value.
-     * This method filter out option with {@code optionName}
-     * name from test java options.
-     *
-     * @param optionName a name of tested option.
-     * @param expectedValue expected value of tested option.
-     * @param optionErrorString message will be shown if option value is not as
-     *                         expected.
-     * @param additionalVMOpts additional options that should be
-     *                         passed to JVM.
-     * @throws Throwable if verification fails or some other issues occur.
-     */
-    public static void verifyOptionValue(String optionName,
-            String expectedValue, String optionErrorString,
-            String... additionalVMOpts) throws Throwable {
-        verifyOptionValue(optionName, expectedValue, optionErrorString,
-                true, additionalVMOpts);
-    }
-
-    /**
-     * Verifies that value of specified JVM option is the same as
-     * expected value.
-     * This method filter out option with {@code optionName}
-     * name from test java options.
-     *
-     * @param optionName a name of tested option.
-     * @param expectedValue expected value of tested option.
-     * @param addTestVmOptions if {@code true}, then test VM options
-     *                         will be used.
-     * @param optionErrorString message will be shown if option value is not as
-     *                         expected.
-     * @param additionalVMOpts additional options that should be
-     *                         passed to JVM.
-     * @throws Throwable if verification fails or some other issues
-     *                          occur.
-     */
-    public static void verifyOptionValue(String optionName,
-            String expectedValue, String optionErrorString,
-            boolean addTestVmOptions, String... additionalVMOpts)
-                    throws Throwable {
-        List<String> vmOpts = new ArrayList<>();
-
-        if (addTestVmOptions) {
-            Collections.addAll(vmOpts,
-                               Utils.getFilteredTestJavaOpts(optionName));
-        }
-        Collections.addAll(vmOpts, additionalVMOpts);
-        Collections.addAll(vmOpts, "-XX:+PrintFlagsFinal", "-version");
-
-        ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
-                vmOpts.toArray(new String[vmOpts.size()]));
-
-        OutputAnalyzer outputAnalyzer
-                = new OutputAnalyzer(processBuilder.start());
-
-        try {
-            outputAnalyzer.shouldHaveExitValue(0);
-        } catch (RuntimeException e) {
-            String errorMessage = String.format(
-                    "JVM should start with option '%s' without errors.",
-                    optionName);
-            throw new AssertionError(errorMessage, e);
-        }
-        verifyOptionValue(optionName, expectedValue, optionErrorString,
-                outputAnalyzer);
-    }
-
-    /**
-     * Verifies that value of specified JVM option is the same as
-     * expected value.
-     *
-     * @param optionName a name of tested option.
-     * @param expectedValue expected value of tested option.
-     * @param optionErrorString message will be shown if option value is not
-     *                          as expected.
-     * @param outputAnalyzer OutputAnalyzer instance
-     * @throws AssertionError if verification fails
-     */
-    public static void verifyOptionValue(String optionName,
-            String expectedValue, String optionErrorString,
-            OutputAnalyzer outputAnalyzer) {
-        try {
-            outputAnalyzer.shouldMatch(String.format(
-                    CommandLineOptionTest.PRINT_FLAGS_FINAL_FORMAT,
-                    optionName, expectedValue));
-        } catch (RuntimeException e) {
-            String errorMessage = String.format(
-                    "Option '%s' is expected to have '%s' value%n%s",
-                    optionName, expectedValue,
-                    optionErrorString);
-            throw new AssertionError(errorMessage, e);
-        }
-    }
-
-    /**
-     * Start VM with given options and values.
-     * Generates command line option flags from
-     * {@code optionNames} and {@code optionValues}.
-     *
-     * @param optionNames names of options to pass in
-     * @param optionValues  values of option
-     * @param additionalVMOpts additional options that should be
-     *                         passed to JVM.
-     * @return output from vm process
-     */
-    public static OutputAnalyzer startVMWithOptions(String[] optionNames,
-            String[] optionValues,
-            String... additionalVMOpts) throws Throwable {
-        List<String> vmOpts = new ArrayList<>();
-        if (optionNames == null || optionValues == null || optionNames.length != optionValues.length) {
-            throw new IllegalArgumentException("optionNames and/or optionValues");
-        }
-
-        for (int i = 0; i < optionNames.length; i++) {
-          vmOpts.add(prepareFlag(optionNames[i], optionValues[i]));
-        }
-        Collections.addAll(vmOpts, additionalVMOpts);
-        Collections.addAll(vmOpts, "-version");
-
-        ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
-                vmOpts.toArray(new String[vmOpts.size()]));
-
-        return new OutputAnalyzer(processBuilder.start());
-    }
-
-    /**
-     * Verifies from the output that values of specified JVM options were the same as
-     * expected values.
-     *
-     * @param outputAnalyzer search output for expect options and values.
-     * @param optionNames names of tested options.
-     * @param expectedValues expected values of tested options.
-     * @throws Throwable if verification fails or some other issues occur.
-     */
-    public static void verifyOptionValuesFromOutput(OutputAnalyzer outputAnalyzer,
-            String[] optionNames,
-            String[] expectedValues) throws Throwable {
-        outputAnalyzer.shouldHaveExitValue(0);
-        for (int i = 0; i < optionNames.length; i++) {
-          outputAnalyzer.shouldMatch(String.format(
-                CommandLineOptionTest.PRINT_FLAGS_FINAL_FORMAT,
-                optionNames[i], expectedValues[i]));
-        }
-    }
-
-   /**
-     * Verifies that value of specified JVM options are the same as
-     * expected values.
-     * Generates command line option flags from
-     * {@code optionNames} and {@code expectedValues}.
-     *
-     * @param optionNames names of tested options.
-     * @param expectedValues expected values of tested options.
-     * @throws Throwable if verification fails or some other issues occur.
-     */
-    public static void verifyOptionValues(String[] optionNames,
-            String[] expectedValues) throws Throwable {
-       OutputAnalyzer outputAnalyzer = startVMWithOptions(optionNames, expectedValues, "-XX:+PrintFlagsFinal");
-       verifyOptionValuesFromOutput(outputAnalyzer, optionNames, expectedValues);
-    }
-
-    /**
-     * Verifies that value of specified JVM when type of newly started VM
-     * is the same as the type of current.
-     * This method filter out option with {@code optionName}
-     * name from test java options.
-     * Only mode flag will be passed to VM in addition to
-     * {@code additionalVMOpts}
-     *
-     * @param optionName name of tested option.
-     * @param expectedValue expected value of tested option.
-     * @param optionErrorString message to show if option has another value
-     * @param additionalVMOpts additional options that should be
-     *                         passed to JVM.
-     * @throws Throwable if verification fails or some other issues occur.
-     */
-    public static void verifyOptionValueForSameVM(String optionName,
-            String expectedValue, String optionErrorString,
-            String... additionalVMOpts) throws Throwable {
-        List<String> finalOptions = new ArrayList<>();
-        finalOptions.add(CommandLineOptionTest.getVMTypeOption());
-        Collections.addAll(finalOptions, additionalVMOpts);
-
-        CommandLineOptionTest.verifyOptionValue(optionName, expectedValue,
-                optionErrorString, false,
-                finalOptions.toArray(new String[finalOptions.size()]));
-    }
-
-    /**
-     * Prepares boolean command line flag with name {@code name} according
-     * to it's {@code value}.
-     *
-     * @param name the name of option to be prepared
-     * @param value the value of option
-     * @return prepared command line flag
-     */
-    public static String prepareBooleanFlag(String name, boolean value) {
-        return String.format("-XX:%c%s", (value ? '+' : '-'), name);
-    }
-
-    /**
-     * Prepares numeric command line flag with name {@code name} by setting
-     * it's value to {@code value}.
-     *
-     * @param name the name of option to be prepared
-     * @param value the value of option
-     * @return prepared command line flag
-     */
-    public static String prepareNumericFlag(String name, Number value) {
-        return String.format("-XX:%s=%s", name, value.toString());
-    }
-
-    /**
-     * Prepares generic command line flag with name {@code name} by setting
-     * it's value to {@code value}.
-     *
-     * @param name the name of option to be prepared
-     * @param value the value of option ("+" or "-" can be used instead of "true" or "false")
-     * @return prepared command line flag
-     */
-    public static String prepareFlag(String name, String value) {
-        if (value.equals("+") || value.equalsIgnoreCase("true")) {
-          return "-XX:+" + name;
-      } else if (value.equals("-") || value.equalsIgnoreCase("false")) {
-        return "-XX:-" + name;
-      } else {
-        return "-XX:" + name + "=" + value;
-      }
-    }
-
-    /**
-     * Returns message that should occur in VM output if option
-     * {@code optionName} if unrecognized.
-     *
-     * @param optionName the name of option for which message should be returned
-     * @return message saying that option {@code optionName} is unrecognized
-     */
-    public static String getUnrecognizedOptionErrorMessage(String optionName) {
-        return String.format(
-                CommandLineOptionTest.UNRECOGNIZED_OPTION_ERROR_FORMAT,
-                optionName);
-    }
-
-    /**
-     * Returns message that should occur in VM output if option
-     * {@code optionName} is experimental and
-     * -XX:+UnlockExperimentalVMOptions was not passed to VM.
-     *
-     * @param optionName the name of option for which message should be returned
-     * @return message saying that option {@code optionName} is experimental
-     */
-    public static String getExperimentalOptionErrorMessage(String optionName) {
-        return String.format(
-                CommandLineOptionTest.EXPERIMENTAL_OPTION_ERROR_FORMAT,
-                optionName);
-    }
-
-    /**
-     * Returns message that should occur in VM output if option
-     * {@code optionName} is diagnostic and -XX:+UnlockDiagnosticVMOptions
-     * was not passed to VM.
-     *
-     * @param optionName the name of option for which message should be returned
-     * @return message saying that option {@code optionName} is diganostic
-     */
-    public static String getDiagnosticOptionErrorMessage(String optionName) {
-        return String.format(
-                CommandLineOptionTest.DIAGNOSTIC_OPTION_ERROR_FORMAT,
-                optionName);
-    }
-
-    /**
-     * @return option required to start a new VM with the same type as current.
-     * @throws RuntimeException when VM type is unknown.
-     */
-    private static String getVMTypeOption() {
-        if (Platform.isServer()) {
-            return "-server";
-        } else if (Platform.isClient()) {
-            return "-client";
-        } else if (Platform.isMinimal()) {
-            return "-minimal";
-        } else if (Platform.isGraal()) {
-            return "-graal";
-        }
-        throw new RuntimeException("Unknown VM mode.");
-    }
-
-    private final BooleanSupplier predicate;
-
-    /**
-     * Constructs new CommandLineOptionTest that will be executed only if
-     * predicate {@code predicate} return {@code true}.
-     * @param predicate a predicate responsible for test's preconditions check.
-     */
-    public CommandLineOptionTest(BooleanSupplier predicate) {
-        this.predicate = predicate;
-    }
-
-    /**
-     * Runs command line option test.
-     */
-    public final void test() throws Throwable {
-        if (predicate.getAsBoolean()) {
-            runTestCases();
-        }
-    }
-
-    /**
-     * @throws Throwable if some issue happened during test cases execution.
-     */
-    protected abstract void runTestCases() throws Throwable;
-}
--- a/test/testlibrary/jdk/test/lib/cli/predicate/AndPredicate.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2014, 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.cli.predicate;
-
-import java.util.function.BooleanSupplier;
-
-public class AndPredicate implements BooleanSupplier {
-    private final BooleanSupplier a;
-    private final BooleanSupplier b;
-
-    public AndPredicate(BooleanSupplier a, BooleanSupplier b) {
-        this.a = a;
-        this.b = b;
-    }
-
-    @Override
-    public boolean getAsBoolean() {
-        return a.getAsBoolean() && b.getAsBoolean();
-    }
-}
--- a/test/testlibrary/jdk/test/lib/cli/predicate/CPUSpecificPredicate.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2014, 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.cli.predicate;
-
-import jdk.test.lib.Platform;
-import sun.hotspot.cpuinfo.CPUInfo;
-
-import java.util.function.BooleanSupplier;
-
-public class CPUSpecificPredicate implements BooleanSupplier {
-    private final String cpuArchPattern;
-    private final String supportedCPUFeatures[];
-    private final String unsupportedCPUFeatures[];
-
-    public CPUSpecificPredicate(String cpuArchPattern,
-            String supportedCPUFeatures[],
-            String unsupportedCPUFeatures[]) {
-        this.cpuArchPattern = cpuArchPattern;
-        this.supportedCPUFeatures = supportedCPUFeatures;
-        this.unsupportedCPUFeatures = unsupportedCPUFeatures;
-    }
-
-    @Override
-    public boolean getAsBoolean() {
-        if (!Platform.getOsArch().matches(cpuArchPattern)) {
-            System.out.println("CPU arch " + Platform.getOsArch() + " does not match " + cpuArchPattern);
-            return false;
-        }
-
-        if (supportedCPUFeatures != null) {
-            for (String feature : supportedCPUFeatures) {
-                if (!CPUInfo.hasFeature(feature)) {
-                    System.out.println("CPU does not support " + feature
-                            + " feature");
-                    return false;
-                }
-            }
-        }
-
-        if (unsupportedCPUFeatures != null) {
-            for (String feature : unsupportedCPUFeatures) {
-                if (CPUInfo.hasFeature(feature)) {
-                    System.out.println("CPU support " + feature + " feature");
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-}
--- a/test/testlibrary/jdk/test/lib/cli/predicate/NotPredicate.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2014, 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.cli.predicate;
-
-import java.util.function.BooleanSupplier;
-
-public class NotPredicate implements BooleanSupplier {
-    private final BooleanSupplier s;
-
-    public NotPredicate(BooleanSupplier s) {
-        this.s = s;
-    }
-
-    @Override
-    public boolean getAsBoolean() {
-        return !s.getAsBoolean();
-    }
-}
--- a/test/testlibrary/jdk/test/lib/cli/predicate/OrPredicate.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2014, 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.cli.predicate;
-
-import java.util.function.BooleanSupplier;
-
-public class OrPredicate implements BooleanSupplier {
-    private final BooleanSupplier a;
-    private final BooleanSupplier b;
-
-    public OrPredicate(BooleanSupplier a, BooleanSupplier b) {
-        this.a = a;
-        this.b = b;
-    }
-
-    @Override
-    public boolean getAsBoolean() {
-        return a.getAsBoolean() || b.getAsBoolean();
-    }
-}
--- a/test/testlibrary/jdk/test/lib/dcmd/CommandExecutor.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * 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
- * 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.dcmd;
-
-import jdk.test.lib.OutputAnalyzer;
-
-/**
- * Abstract base class for Diagnostic Command executors
- */
-public abstract class CommandExecutor {
-
-    /**
-     * Execute a diagnostic command
-     *
-     * @param cmd The diagnostic command to execute
-     * @return an {@link jdk.testlibrary.OutputAnalyzer} encapsulating the output of the command
-     * @throws CommandExecutorException if there is an exception on the "calling side" while trying to execute the
-     *          Diagnostic Command. Exceptions thrown on the remote side are available as textual representations in
-     *          stderr, regardless of the specific executor used.
-     */
-    public final OutputAnalyzer execute(String cmd) throws CommandExecutorException {
-        return execute(cmd, false);
-    }
-
-    /**
-     * Execute a diagnostic command
-     *
-     * @param cmd The diagnostic command to execute
-     * @param silent Do not print the command output
-     * @return an {@link jdk.testlibrary.OutputAnalyzer} encapsulating the output of the command
-     * @throws CommandExecutorException if there is an exception on the "calling side" while trying to execute the
-     *          Diagnostic Command. Exceptions thrown on the remote side are available as textual representations in
-     *          stderr, regardless of the specific executor used.
-     */
-    public final OutputAnalyzer execute(String cmd, boolean silent) throws CommandExecutorException {
-        if (!silent) {
-            System.out.printf("Running DCMD '%s' through '%s'%n", cmd, this.getClass().getSimpleName());
-        }
-
-        OutputAnalyzer oa = executeImpl(cmd);
-
-        if (!silent) {
-            System.out.println("---------------- stdout ----------------");
-            System.out.println(oa.getStdout());
-            System.out.println("---------------- stderr ----------------");
-            System.out.println(oa.getStderr());
-            System.out.println("----------------------------------------");
-            System.out.println();
-        }
-        return oa;
-    }
-
-    protected abstract OutputAnalyzer executeImpl(String cmd) throws CommandExecutorException;
-}
--- a/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * 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
- * 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.dcmd;
-
-/**
- * CommandExecutorException encapsulates exceptions thrown (on the "calling side") from the execution of Diagnostic
- * Commands
- */
-public class CommandExecutorException extends RuntimeException {
-    private static final long serialVersionUID = -7039597746579144280L;
-
-    public CommandExecutorException(String message, Throwable e) {
-        super(message, e);
-    }
-}
--- a/test/testlibrary/jdk/test/lib/dcmd/FileJcmdExecutor.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
- * 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
- * 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.dcmd;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Executes Diagnostic Commands on the target VM (specified by pid) using the jcmd tool and its ability to read
- *          Diagnostic Commands from a file.
- */
-public class FileJcmdExecutor extends PidJcmdExecutor {
-
-    /**
-     * Instantiates a new FileJcmdExecutor targeting the current VM
-     */
-    public FileJcmdExecutor() {
-        super();
-    }
-
-    /**
-     * Instantiates a new FileJcmdExecutor targeting the VM indicated by the given pid
-     *
-     * @param target Pid of the target VM
-     */
-    public FileJcmdExecutor(String target) {
-        super(target);
-    }
-
-    protected List<String> createCommandLine(String cmd) throws CommandExecutorException {
-        File cmdFile = createTempFile();
-        writeCommandToTemporaryFile(cmd, cmdFile);
-
-        return Arrays.asList(jcmdBinary, Long.toString(pid),
-                "-f", cmdFile.getAbsolutePath());
-    }
-
-    private void writeCommandToTemporaryFile(String cmd, File cmdFile) {
-        try (PrintWriter pw = new PrintWriter(cmdFile)) {
-            pw.println(cmd);
-        } catch (IOException e) {
-            String message = "Could not write to file: " + cmdFile.getAbsolutePath();
-            throw new CommandExecutorException(message, e);
-        }
-    }
-
-    private File createTempFile() {
-        try {
-            File cmdFile = File.createTempFile("input", "jcmd");
-            cmdFile.deleteOnExit();
-            return cmdFile;
-        } catch (IOException e) {
-            throw new CommandExecutorException("Could not create temporary file", e);
-        }
-    }
-
-}
--- a/test/testlibrary/jdk/test/lib/dcmd/JMXExecutor.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
- * 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
- * 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.dcmd;
-
-import jdk.test.lib.OutputAnalyzer;
-
-import javax.management.*;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-import java.lang.management.ManagementFactory;
-
-import java.util.HashMap;
-
-/**
- * Executes Diagnostic Commands on the target VM (specified by a host/port combination or a full JMX Service URL) using
- * the JMX interface. If the target is not the current VM, the JMX Remote interface must be enabled beforehand.
- */
-public class JMXExecutor extends CommandExecutor {
-
-    private final MBeanServerConnection mbs;
-
-    /**
-     * Instantiates a new JMXExecutor targeting the current VM
-     */
-    public JMXExecutor() {
-        super();
-        mbs = ManagementFactory.getPlatformMBeanServer();
-    }
-
-    /**
-     * Instantiates a new JMXExecutor targeting the VM indicated by the given host/port combination or a full JMX
-     * Service URL
-     *
-     * @param target a host/port combination on the format "host:port" or a full JMX Service URL of the target VM
-     */
-    public JMXExecutor(String target) {
-        String urlStr;
-
-        if (target.matches("^\\w[\\w\\-]*(\\.[\\w\\-]+)*:\\d+$")) {
-            /* Matches "hostname:port" */
-            urlStr = String.format("service:jmx:rmi:///jndi/rmi://%s/jmxrmi", target);
-        } else if (target.startsWith("service:")) {
-            urlStr = target;
-        } else {
-            throw new IllegalArgumentException("Could not recognize target string: " + target);
-        }
-
-        try {
-            JMXServiceURL url = new JMXServiceURL(urlStr);
-            JMXConnector c = JMXConnectorFactory.connect(url, new HashMap<>());
-            mbs = c.getMBeanServerConnection();
-        } catch (IOException e) {
-            throw new CommandExecutorException("Could not initiate connection to target: " + target, e);
-        }
-    }
-
-    protected OutputAnalyzer executeImpl(String cmd) throws CommandExecutorException {
-        String stdout = "";
-        String stderr = "";
-
-        String[] cmdParts = cmd.split(" ", 2);
-        String operation = commandToMethodName(cmdParts[0]);
-        Object[] dcmdArgs = produceArguments(cmdParts);
-        String[] signature = {String[].class.getName()};
-
-        ObjectName beanName = getMBeanName();
-
-        try {
-            stdout = (String) mbs.invoke(beanName, operation, dcmdArgs, signature);
-        }
-
-        /* Failures on the "local" side, the one invoking the command. */
-        catch (ReflectionException e) {
-            Throwable cause = e.getCause();
-            if (cause instanceof NoSuchMethodException) {
-                /* We want JMXExecutor to match the behavior of the other CommandExecutors */
-                String message = "Unknown diagnostic command: " + operation;
-                stderr = exceptionTraceAsString(new IllegalArgumentException(message, e));
-            } else {
-                rethrowExecutorException(operation, dcmdArgs, e);
-            }
-        }
-
-        /* Failures on the "local" side, the one invoking the command. */
-        catch (InstanceNotFoundException | IOException e) {
-            rethrowExecutorException(operation, dcmdArgs, e);
-        }
-
-        /* Failures on the remote side, the one executing the invoked command. */
-        catch (MBeanException e) {
-            stdout = exceptionTraceAsString(e);
-        }
-
-        return new OutputAnalyzer(stdout, stderr);
-    }
-
-    private void rethrowExecutorException(String operation, Object[] dcmdArgs,
-                                          Exception e) throws CommandExecutorException {
-        String message = String.format("Could not invoke: %s %s", operation,
-                String.join(" ", (String[]) dcmdArgs[0]));
-        throw new CommandExecutorException(message, e);
-    }
-
-    private ObjectName getMBeanName() throws CommandExecutorException {
-        String MBeanName = "com.sun.management:type=DiagnosticCommand";
-
-        try {
-            return new ObjectName(MBeanName);
-        } catch (MalformedObjectNameException e) {
-            String message = "MBean not found: " + MBeanName;
-            throw new CommandExecutorException(message, e);
-        }
-    }
-
-    private Object[] produceArguments(String[] cmdParts) {
-        Object[] dcmdArgs = {new String[0]}; /* Default: No arguments */
-
-        if (cmdParts.length == 2) {
-            dcmdArgs[0] = cmdParts[1].split(" ");
-        }
-        return dcmdArgs;
-    }
-
-    /**
-     * Convert from diagnostic command to MBean method name
-     *
-     * Examples:
-     * help            --> help
-     * VM.version      --> vmVersion
-     * VM.command_line --> vmCommandLine
-     */
-    private static String commandToMethodName(String cmd) {
-        String operation = "";
-        boolean up = false; /* First letter is to be lower case */
-
-        /*
-         * If a '.' or '_' is encountered it is not copied,
-         * instead the next character will be converted to upper case
-         */
-        for (char c : cmd.toCharArray()) {
-            if (('.' == c) || ('_' == c)) {
-                up = true;
-            } else if (up) {
-                operation = operation.concat(Character.toString(c).toUpperCase());
-                up = false;
-            } else {
-                operation = operation.concat(Character.toString(c).toLowerCase());
-            }
-        }
-
-        return operation;
-    }
-
-    private static String exceptionTraceAsString(Throwable cause) {
-        StringWriter sw = new StringWriter();
-        cause.printStackTrace(new PrintWriter(sw));
-        return sw.toString();
-    }
-
-}
--- a/test/testlibrary/jdk/test/lib/dcmd/JcmdExecutor.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * 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
- * 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.dcmd;
-
-import jdk.test.lib.JDKToolFinder;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
-
-import java.util.List;
-
-/**
- * Base class for Diagnostic Command Executors using the jcmd tool
- */
-public abstract class JcmdExecutor extends CommandExecutor {
-    protected String jcmdBinary;
-
-    protected abstract List<String> createCommandLine(String cmd) throws CommandExecutorException;
-
-    protected JcmdExecutor() {
-        jcmdBinary = JDKToolFinder.getJDKTool("jcmd");
-    }
-
-    protected OutputAnalyzer executeImpl(String cmd) throws CommandExecutorException {
-        List<String> commandLine = createCommandLine(cmd);
-
-        try {
-            System.out.printf("Executing command '%s'%n", commandLine);
-            OutputAnalyzer output = ProcessTools.executeProcess(new ProcessBuilder(commandLine));
-            System.out.printf("Command returned with exit code %d%n", output.getExitValue());
-
-            return output;
-        } catch (Exception e) {
-            String message = String.format("Caught exception while executing '%s'", commandLine);
-            throw new CommandExecutorException(message, e);
-        }
-    }
-}
--- a/test/testlibrary/jdk/test/lib/dcmd/MainClassJcmdExecutor.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * 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
- * 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.dcmd;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Executes Diagnostic Commands on the target VM (specified by main class) using the jcmd tool
- */
-public class MainClassJcmdExecutor extends JcmdExecutor {
-    private final String mainClass;
-
-    /**
-     * Instantiates a new MainClassJcmdExecutor targeting the current VM
-     */
-    public MainClassJcmdExecutor() {
-        super();
-        mainClass = System.getProperty("sun.java.command").split(" ")[0];
-    }
-
-    /**
-     * Instantiates a new MainClassJcmdExecutor targeting the VM indicated by the given main class
-     *
-     * @param target Main class of the target VM
-     */
-    public MainClassJcmdExecutor(String target) {
-        super();
-        mainClass = target;
-    }
-
-    protected List<String> createCommandLine(String cmd) throws CommandExecutorException {
-        return Arrays.asList(jcmdBinary, mainClass, cmd);
-    }
-
-}
--- a/test/testlibrary/jdk/test/lib/dcmd/PidJcmdExecutor.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * 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
- * 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.dcmd;
-
-import jdk.test.lib.ProcessTools;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Executes Diagnostic Commands on the target VM (specified by pid) using the jcmd tool
- */
-public class PidJcmdExecutor extends JcmdExecutor {
-    protected final long pid;
-
-    /**
-     * Instantiates a new PidJcmdExecutor targeting the current VM
-     */
-    public PidJcmdExecutor() {
-        super();
-        try {
-            pid = ProcessTools.getProcessId();
-        } catch (Exception e) {
-            throw new CommandExecutorException("Could not determine own pid", e);
-        }
-    }
-
-    /**
-     * Instantiates a new PidJcmdExecutor targeting the VM indicated by the given pid
-     *
-     * @param target Pid of the target VM
-     */
-    public PidJcmdExecutor(String target) {
-        super();
-        pid = Long.valueOf(target);
-    }
-
-    protected List<String> createCommandLine(String cmd) throws CommandExecutorException {
-        return Arrays.asList(jcmdBinary, Long.toString(pid), cmd);
-    }
-
-}
--- a/test/testlibrary/jdk/test/lib/dtrace/DtraceResultsAnalyzer.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2014, 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.dtrace;
-
-import jdk.test.lib.OutputAnalyzer;
-
-public interface DtraceResultsAnalyzer {
-    public void analyze(OutputAnalyzer oa, String logFilePath);
-}
--- a/test/testlibrary/jdk/test/lib/dtrace/DtraceRunner.java	Thu Sep 01 23:20:10 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2014, 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.dtrace;
-
-import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class DtraceRunner {
-
-    private static final String DTRACE_DEFAULT_PATH = "/usr/sbin/dtrace";
-    private static final String DTRACE_PATH_PROPERTY
-            = "com.oracle.test.dtrace.path";
-    private static final String OUTPUT_FILE_DTRACE_OPTION = "o";
-    private static final String RUN_COMMAND_DTRACE_OPTION = "c";
-    private static final String RUN_SCRIPT_DTRACE_OPTION = "s";
-    private static final String ALLOW_ZERO_PROBE_DESCRIPTION_DTRACE_OPTION = "Z";
-    private static final String DTRACE_OPTION_PREFIX = "-";
-    public static final String PERMIT_DESTRUCTIVE_ACTIONS_DTRACE_OPTION = "w";
-    public static final String DTRACE_OUT_LOG = "dtrace.out";
-
-    private final String dtraceExecutable;
-
-    public DtraceRunner() {
-        dtraceExecutable = getDtracePath();
-    }
-
-    private List<String> getLaunchCmd(String java, String javaOpts,
-            String execClass, String testArgs, String dtraceScript,
-            String dtraceAddOpts) {
-        Asserts.assertTrue(!java.matches("\\s"), "Current dtrace implementation"
-                + " can't handle whitespaces in application path");
-        List<String> result = new ArrayList<>();
-        result.add(dtraceExecutable);
-        result.add(DTRACE_OPTION_PREFIX + System.getProperty("sun.arch.data.model"));
-        result.add(DTRACE_OPTION_PREFIX
-                + ALLOW_ZERO_PROBE_DESCRIPTION_DTRACE_OPTION
-                + ((dtraceAddOpts == null) ? "" : dtraceAddOpts)
-                + RUN_SCRIPT_DTRACE_OPTION); // run_script should be last one
-        result.add(dtraceScript);
-        result.add(DTRACE_OPTION_PREFIX + OUTPUT_FILE_DTRACE_OPTION);
-        result.add(DTRACE_OUT_LOG);
-        result.add(DTRACE_OPTION_PREFIX + RUN_COMMAND_DTRACE_OPTION);
-        result.add(java + " " + javaOpts + " " + execClass + " " + testArgs);
-        return result;
-    }
-
-    private void backupLogFile(File file) {
-        if (file.exists()) {
-            file.renameTo(new File(file.getPath() + ".bak"));
-        }
-    }
-
-    public void runDtrace(String java, String javaOpts, String execClass,
-            String testArgs, String dtraceScript, String dtraceAddOpts,
-            DtraceResultsAnalyzer analyzer) {
-        backupLogFile(new File(DTRACE_OUT_LOG));
-        ProcessBuilder pbuilder = new ProcessBuilder(
-                getLaunchCmd(java, javaOpts, execClass, testArgs,
-                        dtraceScript, dtraceAddOpts));
-        OutputAnalyzer oa;
-        try {
-            oa = new OutputAnalyzer(pbuilder.start());
-        } catch (IOException e) {
-            throw new Error("TESTBUG: Can't start process", e);
-        }
-        analyzer.analyze(oa, DTRACE_OUT_LOG);
-    }
-
-    public static boolean dtraceAvailable() {
-        String path = getDtracePath();
-        if (path == null) {
-            return false;
-        }
-        // now we'll launch dtrace to trace itself just to be sure it works
-        // and have all additional previleges set
-        ProcessBuilder pbuilder = new ProcessBuilder(path, path);
-        try {
-            OutputAnalyzer oa = new OutputAnalyzer(pbuilder.start());
-            if (oa.getExitValue() != 0) {
-                return false;
-            }
-        } catch (IOException e) {
-            throw new Error("Couldn't launch dtrace", e);
-        }
-        return true;
-    }
-
-    private static String getDtracePath() {
-        String propPath = System.getProperty(DTRACE_PATH_PROPERTY);
-        if (propPath != null && new File(propPath).exists()) {
-            return propPath;
-        } else if (new File(DTRACE_DEFAULT_PATH).exists()) {
-            return DTRACE_DEFAULT_PATH;
-        }
-        return null;
-    }
-}
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/AssignmentOperatorImplFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/AssignmentOperatorImplFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryBitwiseOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryBitwiseOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryComparisonOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryComparisonOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryEqualityOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryEqualityOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryLogicOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryLogicOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryShiftOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryShiftOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryStringPlusFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryStringPlusFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundArithmeticAssignmentOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundArithmeticAssignmentOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundBitwiseAssignmentOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundBitwiseAssignmentOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundShiftAssignmentOperatorFactory.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundShiftAssignmentOperatorFactory.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/jtreg/JitTesterDriver.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/jtreg/JitTesterDriver.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary/jittester/src/jdk/test/lib/jittester/visitors/ByteCodeVisitor.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary/jittester/src/jdk/test/lib/jittester/visitors/ByteCodeVisitor.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary_tests/AssertsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/AssertsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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> {
--- a/test/testlibrary_tests/OutputAnalyzerReportingTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/OutputAnalyzerReportingTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
--- a/test/testlibrary_tests/OutputAnalyzerTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/OutputAnalyzerTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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 {
 
--- a/test/testlibrary_tests/RandomGeneratorTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/RandomGeneratorTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
 
 /**
--- a/test/testlibrary_tests/RedefineClassTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/RedefineClassTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/SimpleClassFileLoadHookTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/SimpleClassFileLoadHookTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @library /testlibrary
+ * @library /test/lib
  * @requires vm.flavor != "minimal"
  * @run main/othervm/native -agentlib:SimpleClassFileLoadHook=Foo,XXX,YYY
  *      SimpleClassFileLoadHookTest
--- a/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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");
--- a/test/testlibrary_tests/TestPlatformIsTieredSupported.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/TestPlatformIsTieredSupported.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/ctw/ClassesDirTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/ctw/ClassesDirTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/ctw/ClassesListTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/ctw/ClassesListTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/ctw/CtwTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/ctw/CtwTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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;
--- a/test/testlibrary_tests/ctw/JarDirTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/ctw/JarDirTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/ctw/JarsTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/ctw/JarsTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/whitebox/BlobSanityTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/BlobSanityTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/whitebox/vm_flags/BooleanTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/vm_flags/BooleanTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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.*;
 
--- a/test/testlibrary_tests/whitebox/vm_flags/DoubleTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/vm_flags/DoubleTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/whitebox/vm_flags/IntxTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/vm_flags/IntxTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/whitebox/vm_flags/SizeTTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/vm_flags/SizeTTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/whitebox/vm_flags/StringTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/vm_flags/StringTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/whitebox/vm_flags/Uint64Test.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/vm_flags/Uint64Test.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/whitebox/vm_flags/UintxTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/vm_flags/UintxTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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
--- a/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java	Thu Sep 01 23:20:10 2016 +0000
+++ b/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java	Fri Sep 02 02:41:12 2016 +0000
@@ -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> {