changeset 36471:df8107032af5

Merge
author ddehaven
date Mon, 07 Mar 2016 16:38:23 -0800
parents d5a6c81c5254 c870cb782aca
children 323288129e00 6bbb00025fc9
files jdk/src/java.base/share/classes/sun/misc/Version.java.template jdk/src/java.base/share/native/libjava/Version.c jdk/test/java/lang/invoke/T8139885.java jdk/test/sun/misc/Version/Version.java
diffstat 328 files changed, 6979 insertions(+), 3298 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Mar 07 11:54:42 2016 +0530
+++ b/.hgtags	Mon Mar 07 16:38:23 2016 -0800
@@ -350,3 +350,4 @@
 db483b34fa7148d257a429acddbde9c13687dcae jdk-9+105
 6c644cca3f3fc2763e2ff7d669849a75d34543ba jdk-9+106
 1c076468bf7dad5b8f2ee5dcf66e2279caa3e208 jdk-9+107
+257b579d813201682931d6b42f0445ffe5b4210d jdk-9+108
--- a/.hgtags-top-repo	Mon Mar 07 11:54:42 2016 +0530
+++ b/.hgtags-top-repo	Mon Mar 07 16:38:23 2016 -0800
@@ -350,3 +350,4 @@
 be58b02c11f90b88c67e4d0e2cb5e4cf2d9b3c57 jdk-9+105
 54575d8783b3a39a2d710c28cda675d44261f9d9 jdk-9+106
 4d65eba233a8730f913734a6804910b842d2cb54 jdk-9+107
+c7be2a78c31b3b6132f2f5e9e4b3d3bb1c20245c jdk-9+108
--- a/common/conf/jib-profiles.js	Mon Mar 07 11:54:42 2016 +0530
+++ b/common/conf/jib-profiles.js	Mon Mar 07 16:38:23 2016 -0800
@@ -311,6 +311,16 @@
             labels: [ "open" ]
         },
 
+        "linux-x86-open": {
+            target_os: mainProfiles["linux-x86"].target_os,
+            target_cpu: mainProfiles["linux-x86"].target_cpu,
+            dependencies: mainProfiles["linux-x86"].dependencies,
+            configure_args: concat(mainProfiles["linux-x86"].configure_args,
+                "--enable-openjdk-only"),
+            make_args: mainProfiles["linux-x86"].make_args,
+            labels: [ "open" ]
+        },
+
         "solaris-x64-open": {
             target_os: mainProfiles["solaris-x64"].target_os,
             target_cpu: mainProfiles["solaris-x64"].target_cpu,
@@ -319,6 +329,16 @@
                 "--enable-openjdk-only"),
             make_args: mainProfiles["solaris-x64"].make_args,
             labels: [ "open" ]
+        },
+
+        "windows-x86-open": {
+            target_os: mainProfiles["windows-x86"].target_os,
+            target_cpu: mainProfiles["windows-x86"].target_cpu,
+            dependencies: mainProfiles["windows-x86"].dependencies,
+            configure_args: concat(mainProfiles["windows-x86"].configure_args,
+                "--enable-openjdk-only"),
+            make_args: mainProfiles["windows-x86"].make_args,
+            labels: [ "open" ]
         }
     };
     profiles = concatObjects(profiles, jprtOpenProfiles);
--- a/corba/.hgtags	Mon Mar 07 11:54:42 2016 +0530
+++ b/corba/.hgtags	Mon Mar 07 16:38:23 2016 -0800
@@ -350,3 +350,4 @@
 64006ae915b3aa85ac7e6fac679024d2da7fe526 jdk-9+105
 8ec4f97943fe56f93e4621f622b56b7144c0181a jdk-9+106
 49202432b69445164a42be7cbdf74ed5fce98157 jdk-9+107
+84f2862a25eb3232ff36c376b4e2bf2a83dfced3 jdk-9+108
--- a/hotspot/.hgtags	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/.hgtags	Mon Mar 07 16:38:23 2016 -0800
@@ -510,3 +510,4 @@
 266fa9bb5297bf02cb2a7b038b10a109817d2b48 jdk-9+105
 7232de4c17c37f60aecec4f3191090bd3d41d334 jdk-9+106
 c5146d4da417f76edfc43097d2e2ced042a65b4e jdk-9+107
+934f6793f5f7dca44f69b4559d525fa64b31840d jdk-9+108
--- a/hotspot/make/bsd/makefiles/amd64.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/bsd/makefiles/amd64.make	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2010, 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
@@ -37,3 +37,11 @@
 endif
 
 OPT_CFLAGS/compactingPermGenGen.o = -O1
+
+# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+# of OPT_CFLAGS. Restore it here.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+   OPT_CFLAGS/sharedRuntimeTrig.o += -g
+   OPT_CFLAGS/sharedRuntimeTrans.o += -g
+   OPT_CFLAGS/compactingPermGenGen.o += -g
+endif
--- a/hotspot/make/bsd/makefiles/gcc.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/bsd/makefiles/gcc.make	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -330,6 +330,13 @@
     ), 1)
     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
     OPT_CFLAGS/unsafe.o += -O1
+
+    # The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+    # of OPT_CFLAGS. Restore it here.
+    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+      OPT_CFLAGS/loopTransform.o += -g
+      OPT_CFLAGS/unsafe.o += -g
+    endif
   else
     $(error "Update compiler workarounds for Clang $(CC_VER_MAJOR).$(CC_VER_MINOR)")
   endif
--- a/hotspot/make/linux/makefiles/amd64.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/linux/makefiles/amd64.make	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2013, 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
@@ -32,3 +32,11 @@
 CFLAGS += -D_LP64=1
 
 OPT_CFLAGS/compactingPermGenGen.o = -O1
+
+# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+# of OPT_CFLAGS. Restore it here.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+   OPT_CFLAGS/sharedRuntimeTrig.o += -g
+   OPT_CFLAGS/sharedRuntimeTrans.o += -g
+   OPT_CFLAGS/compactingPermGenGen.o += -g
+endif
--- a/hotspot/make/linux/makefiles/gcc.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/linux/makefiles/gcc.make	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -265,6 +265,11 @@
   # GCC >= 4.3
   # Gcc 4.1.2 does not support this flag, nor does it have problems compiling the file.
   OPT_CFLAGS/vmStructs.o += -fno-var-tracking-assignments
+  # The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+  # of OPT_CFLAGS. Restore it here.
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    OPT_CFLAGS/vmStructs.o += -g
+  endif
 endif
 
 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
@@ -277,6 +282,11 @@
 ifeq ($(USE_CLANG), true)
   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
+    # The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+    # of OPT_CFLAGS. Restore it here.
+    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+      OPT_CFLAGS/loopTransform.o += -g
+    endif
   endif
 else
   # Do not allow GCC 4.1.1
--- a/hotspot/make/linux/makefiles/i486.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/linux/makefiles/i486.make	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2010, 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
@@ -32,3 +32,11 @@
 CFLAGS += -DVM_LITTLE_ENDIAN
 
 OPT_CFLAGS/compactingPermGenGen.o = -O1
+
+# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+# of OPT_CFLAGS. Restore it here.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+   OPT_CFLAGS/sharedRuntimeTrig.o += -g
+   OPT_CFLAGS/sharedRuntimeTrans.o += -g
+   OPT_CFLAGS/compactingPermGenGen.o += -g
+endif
--- a/hotspot/make/linux/makefiles/zeroshark.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/linux/makefiles/zeroshark.make	Mon Mar 07 16:38:23 2016 -0800
@@ -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 2007, 2008 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -29,12 +29,6 @@
 ifeq ($(USE_CLANG), true)
   WARNING_FLAGS += -Wno-undef
 endif
-# Suppress some warning flags that are normally turned on for hotspot,
-# because some of the zero code has not been updated accordingly.
-WARNING_FLAGS += -Wno-return-type \
-  -Wno-format-nonliteral -Wno-format-security \
-  -Wno-maybe-uninitialized
- 
 
 # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
 OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
--- a/hotspot/make/solaris/makefiles/amd64.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/solaris/makefiles/amd64.make	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,14 @@
 OPT_CFLAGS/generateOptoStub.o = -xO2
 # Temporary util SS12u1 C++ compiler is fixed
 OPT_CFLAGS/c1_LinearScan.o = -xO2
+
+# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+# of OPT_CFLAGS. Restore it here.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+  OPT_CFLAGS/generateOptoStub.o += -g0 -xs
+  OPT_CFLAGS/LinearScan.o += -g0 -xs
+endif
+
 else
 
 ifeq ("${Platform_compiler}", "gcc")
--- a/hotspot/make/solaris/makefiles/product.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/solaris/makefiles/product.make	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2012, 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
@@ -35,11 +35,21 @@
 # for this method for now. (fix this when dtrace bug 6258412 is fixed)
 ifndef USE_GCC
 OPT_CFLAGS/ciEnv.o = $(OPT_CFLAGS) -xinline=no%__1cFciEnvbFpost_compiled_method_load_event6MpnHnmethod__v_
+# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+# of OPT_CFLAGS. Restore it here.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+   OPT_CFLAGS/ciEnv.o += -g0 -xs
+endif
 endif
 
 # Need extra inlining to get oop_ps_push_contents functions to perform well enough.
 ifndef USE_GCC
 OPT_CFLAGS/psPromotionManager.o = $(OPT_CFLAGS) -W2,-Ainline:inc=1000
+# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+# of OPT_CFLAGS. Restore it here.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+   OPT_CFLAGS/psPromotionManager.o += -g0 -xs
+endif
 endif
 
 # (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
@@ -55,6 +65,12 @@
 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
 # dtrace cannot handle tail call optimization (6672627, 6693876)
 OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT)
+# The -g0 -xs flag is added to OPT_CFLAGS in sparcWorks.make, but lost in case of
+# per-file overrides of OPT_CFLAGS. Restore it here. This is mainly needed
+# to provide a good baseline to compare the new build against.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+   OPT_CFLAGS/jni.o += -g0 -xs
+endif
 endif # COMPILER_NUMERIC_REV >= 509
 
 # Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
--- a/hotspot/make/solaris/makefiles/sparcWorks.make	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/make/solaris/makefiles/sparcWorks.make	Mon Mar 07 16:38:23 2016 -0800
@@ -158,9 +158,20 @@
 OPT_CCFLAGS/NO_TAIL_CALL_OPT = -Qoption ube -O~yz
 OPT_CFLAGS/stubGenerator_x86_32.o = $(OPT_CFLAGS) -xspace
 OPT_CFLAGS/stubGenerator_x86_64.o = $(OPT_CFLAGS) -xspace
+# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+# of OPT_CFLAGS. Restore it here.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+   OPT_CFLAGS/stubGenerator_x86_32.o += -g0 -xs
+   OPT_CFLAGS/stubGenerator_x86_64.o += -g0 -xs
+endif
 endif # Platform_arch == x86
 ifeq ("${Platform_arch}", "sparc")
 OPT_CFLAGS/stubGenerator_sparc.o = $(OPT_CFLAGS) -xspace
+# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+# of OPT_CFLAGS. Restore it here.
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+   OPT_CFLAGS/stubGenerator_sparc.o += -g0 -xs
+endif
 endif
 endif # COMPILER_REV_NUMERIC >= 509
 
--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -773,7 +773,7 @@
 }
 
 BasicType CppInterpreter::result_type_of(Method* method) {
-  BasicType t;
+  BasicType t = T_ILLEGAL; // silence compiler warnings
   switch (method->result_index()) {
     case 0 : t = T_BOOLEAN; break;
     case 1 : t = T_CHAR;    break;
--- a/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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.
  * Copyright 2007, 2008, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -62,7 +62,7 @@
 }
 
 void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) {
-  ffi_type *ftype;
+  ffi_type *ftype = NULL;
   switch (type) {
   case T_VOID:
     ftype = &ffi_type_void;
--- a/hotspot/src/os/aix/vm/attachListener_aix.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/os/aix/vm/attachListener_aix.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016 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
@@ -225,7 +225,7 @@
   // We must call bind with the actual socketaddr length. This is obligatory for AS400.
   int res = ::bind(listener, (struct sockaddr*)&addr, SUN_LEN(&addr));
   if (res == -1) {
-    RESTARTABLE(::close(listener), res);
+    ::close(listener);
     return -1;
   }
 
@@ -238,7 +238,7 @@
       }
   }
   if (res == -1) {
-    RESTARTABLE(::close(listener), res);
+    ::close(listener);
     ::unlink(initial_path);
     return -1;
   }
@@ -400,7 +400,7 @@
     AixAttachOperation* op = read_request(s);
     if (op == NULL) {
       int res;
-      RESTARTABLE(::close(s), res);
+      ::close(s);
       continue;
     } else {
       return op;
@@ -452,7 +452,7 @@
   }
 
   // done
-  RESTARTABLE(::close(this->socket()), rc);
+  ::close(this->socket());
 
   // were we externally suspended while we were waiting?
   thread->check_and_wait_while_suspended();
--- a/hotspot/src/os/aix/vm/perfMemory_aix.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/os/aix/vm/perfMemory_aix.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016 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
@@ -121,7 +121,7 @@
       addr += result;
     }
 
-    RESTARTABLE(::close(fd), result);
+    result = ::close(fd);
     if (PrintMiscellaneous && Verbose) {
       if (result == OS_ERR) {
         warning("Could not close %s: %s\n", destfile, strerror(errno));
@@ -299,10 +299,13 @@
   bool create;
   int error;
   int fd;
+  int result;
 
   create = false;
 
-  if (lstat(path, &orig_st) != 0) {
+  RESTARTABLE(::lstat(path, &orig_st), result);
+
+  if (result == OS_ERR) {
     if (errno == ENOENT && (oflag & O_CREAT) != 0) {
       // File doesn't exist, but_we want to create it, add O_EXCL flag
       // to make sure no-one creates it (or a symlink) before us
@@ -316,7 +319,7 @@
       return OS_ERR;
     }
   } else {
-    // Lstat success, check if existing file is a link.
+    // lstat success, check if existing file is a link.
     if ((orig_st.st_mode & S_IFMT) == S_IFLNK)  {
       // File is a symlink.
       errno = ELOOP;
@@ -325,9 +328,9 @@
   }
 
   if (use_mode == true) {
-    fd = open(path, oflag, mode);
+    RESTARTABLE(::open(path, oflag, mode), fd);
   } else {
-    fd = open(path, oflag);
+    RESTARTABLE(::open(path, oflag), fd);
   }
 
   if (fd == OS_ERR) {
@@ -336,7 +339,8 @@
 
   // Can't do inode checks on before/after if we created the file.
   if (create == false) {
-    if (fstat(fd, &new_st) != 0) {
+    RESTARTABLE(::fstat(fd, &new_st), result);
+    if (result == OS_ERR) {
       // Keep errno from fstat, in case close also fails.
       error = errno;
       ::close(fd);
@@ -384,7 +388,7 @@
   RESTARTABLE(::open(dirname, O_RDONLY|O_NOFOLLOW), result);
 #else
   // workaround (jdk6 coding)
-  RESTARTABLE(::open_o_nofollow(dirname, O_RDONLY), result);
+  result = open_o_nofollow(dirname, O_RDONLY);
 #endif
 
   if (result == OS_ERR) {
@@ -888,7 +892,7 @@
   RESTARTABLE(::open(filename, O_RDWR|O_CREAT|O_NOFOLLOW, S_IREAD|S_IWRITE), result);
 #else
   // workaround function (jdk6 code)
-  RESTARTABLE(::open_o_nofollow(filename, O_RDWR|O_CREAT, S_IREAD|S_IWRITE), result);
+  result = open_o_nofollow(filename, O_RDWR|O_CREAT, S_IREAD|S_IWRITE);
 #endif
 
   if (result == OS_ERR) {
@@ -931,7 +935,7 @@
     if (PrintMiscellaneous && Verbose) {
       warning("could not set shared memory file size: %s\n", strerror(errno));
     }
-    RESTARTABLE(::close(fd), result);
+    ::close(fd);
     return -1;
   }
 
@@ -951,7 +955,7 @@
 #ifdef O_NOFOLLOW
   RESTARTABLE(::open(filename, oflags), result);
 #else
-  RESTARTABLE(::open_o_nofollow(filename, oflags), result);
+  open_o_nofollow(filename, oflags);
 #endif
 
   if (result == OS_ERR) {
@@ -1006,8 +1010,7 @@
 
   char* dirname = get_user_tmp_dir(user_name);
   char* filename = get_sharedmem_filename(dirname, vmid);
-
-  // Get the short filename.
+  // get the short filename.
   char* short_filename = strrchr(filename, '/');
   if (short_filename == NULL) {
     short_filename = filename;
@@ -1033,9 +1036,7 @@
 
   mapAddress = (char*)::mmap((char*)0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
 
-  // attempt to close the file - restart it if it was interrupted,
-  // but ignore other failures
-  RESTARTABLE(::close(fd), result);
+  result = ::close(fd);
   assert(result != OS_ERR, "could not close file");
 
   if (mapAddress == MAP_FAILED) {
@@ -1142,7 +1143,6 @@
   // constructs for the file and the shared memory mapping.
   if (mode == PerfMemory::PERF_MODE_RO) {
     mmap_prot = PROT_READ;
-
   // No O_NOFOLLOW defined at buildtime, and it is not documented for open.
 #ifdef O_NOFOLLOW
     file_flags = O_RDONLY | O_NOFOLLOW;
@@ -1205,21 +1205,28 @@
   FREE_C_HEAP_ARRAY(char, filename);
 
   // open the shared memory file for the give vmid
-  fd = open_sharedmem_file(rfilename, file_flags, CHECK);
-  assert(fd != OS_ERR, "unexpected value");
+  fd = open_sharedmem_file(rfilename, file_flags, THREAD);
+
+  if (fd == OS_ERR) {
+    return;
+  }
+
+  if (HAS_PENDING_EXCEPTION) {
+    ::close(fd);
+    return;
+  }
 
   if (*sizep == 0) {
     size = sharedmem_filesize(fd, CHECK);
-    assert(size != 0, "unexpected size");
   } else {
     size = *sizep;
   }
 
+  assert(size > 0, "unexpected size <= 0");
+
   mapAddress = (char*)::mmap((char*)0, size, mmap_prot, MAP_SHARED, fd, 0);
 
-  // attempt to close the file - restart if it gets interrupted,
-  // but ignore other failures
-  RESTARTABLE(::close(fd), result);
+  result = ::close(fd);
   assert(result != OS_ERR, "could not close file");
 
   if (mapAddress == MAP_FAILED) {
@@ -1230,7 +1237,7 @@
               "Could not map PerfMemory");
   }
 
-  // It does not go through os api, the operation has to record from here.
+  // it does not go through os api, the operation has to record from here.
   MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC, mtInternal);
 
   *addr = mapAddress;
@@ -1238,7 +1245,7 @@
 
   if (PerfTraceMemOps) {
     tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at "
-               INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress);
+               INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
   }
 }
 
--- a/hotspot/src/os/posix/vm/os_posix.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/os/posix/vm/os_posix.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -238,14 +238,12 @@
   st->cr();
 }
 
-#ifndef PRODUCT
 bool os::get_host_name(char* buf, size_t buflen) {
   struct utsname name;
   uname(&name);
   jio_snprintf(buf, buflen, "%s", name.nodename);
   return true;
 }
-#endif // PRODUCT
 
 bool os::has_allocatable_memory_limit(julong* limit) {
   struct rlimit rlim;
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1531,12 +1531,10 @@
   return result;
 }
 
-#ifndef PRODUCT
 bool os::get_host_name(char* buf, size_t buflen) {
   DWORD size = (DWORD)buflen;
   return (GetComputerNameEx(ComputerNameDnsHostname, buf, &size) == TRUE);
 }
-#endif // PRODUCT
 
 void os::get_summary_os_info(char* buf, size_t buflen) {
   stringStream sst(buf, buflen);
--- a/hotspot/src/os/windows/vm/perfMemory_windows.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/os/windows/vm/perfMemory_windows.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -628,6 +628,7 @@
 
   if (!is_directory_secure(dirname)) {
     // the directory is not secure, don't attempt any cleanup
+    os::closedir(dirp);
     return;
   }
 
@@ -1445,6 +1446,8 @@
 
   // check that the file system is secure - i.e. it supports ACLs.
   if (!is_filesystem_secure(dirname)) {
+    FREE_C_HEAP_ARRAY(char, dirname);
+    FREE_C_HEAP_ARRAY(char, user);
     return NULL;
   }
 
@@ -1624,6 +1627,7 @@
   //
   if (!is_directory_secure(dirname)) {
     FREE_C_HEAP_ARRAY(char, dirname);
+    if (luser != user) FREE_C_HEAP_ARRAY(char, luser);
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
               "Process not found");
   }
--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -65,6 +65,7 @@
 
 frame os::get_sender_for_C_frame(frame* fr) {
   ShouldNotCallThis();
+  return frame(NULL, NULL); // silence compile warning.
 }
 
 frame os::current_frame() {
@@ -102,6 +103,7 @@
 
 address os::Linux::ucontext_get_pc(const ucontext_t* uc) {
   ShouldNotCallThis();
+  return NULL; // silence compile warnings
 }
 
 void os::Linux::ucontext_set_pc(ucontext_t * uc, address pc) {
@@ -112,10 +114,12 @@
                                         intptr_t** ret_sp,
                                         intptr_t** ret_fp) {
   ShouldNotCallThis();
+  return NULL; // silence compile warnings
 }
 
 frame os::fetch_frame_from_context(const void* ucVoid) {
   ShouldNotCallThis();
+  return frame(NULL, NULL); // silence compile warnings
 }
 
 extern "C" JNIEXPORT int
@@ -262,11 +266,16 @@
   }
 #endif // !PRODUCT
 
-  const char *fmt = "caught unhandled signal %d";
   char buf[64];
 
-  sprintf(buf, fmt, sig);
+  sprintf(buf, "caught unhandled signal %d", sig);
+
+// Silence -Wformat-security warning for fatal()
+PRAGMA_DIAG_PUSH
+PRAGMA_FORMAT_NONLITERAL_IGNORED
   fatal(buf);
+PRAGMA_DIAG_POP
+  return true; // silence compiler warnings
 }
 
 void os::Linux::init_thread_fpu_state(void) {
@@ -275,6 +284,7 @@
 
 int os::Linux::get_fpu_control_word() {
   ShouldNotCallThis();
+  return -1; // silence compile warnings
 }
 
 void os::Linux::set_fpu_control_word(int fpu) {
@@ -419,6 +429,7 @@
 
 extern "C" {
   int SpinPause() {
+      return -1; // silence compile warnings
   }
 
 
--- a/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -110,6 +110,7 @@
                                            void* ucontext,
                                            bool isInJava) {
     ShouldNotCallThis();
+    return false; // silence compile warning
   }
 
   // These routines are only used on cpu architectures that
--- a/hotspot/src/share/vm/classfile/stringTable.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/classfile/stringTable.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -200,7 +200,6 @@
   return string;
 }
 
-
 oop StringTable::intern(Handle string_or_null, jchar* name,
                         int len, TRAPS) {
   oop found_string = lookup_shared(name, len);
@@ -214,7 +213,9 @@
 
   // Found
   if (found_string != NULL) {
-    ensure_string_alive(found_string);
+    if (found_string != string_or_null()) {
+      ensure_string_alive(found_string);
+    }
     return found_string;
   }
 
@@ -249,7 +250,9 @@
                                   hashValue, CHECK_NULL);
   }
 
-  ensure_string_alive(added_or_found);
+  if (added_or_found != string()) {
+    ensure_string_alive(added_or_found);
+  }
 
   return added_or_found;
 }
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -123,7 +123,7 @@
   template(sun_misc_Launcher_ExtClassLoader,          "sun/misc/Launcher$ExtClassLoader")         \
                                                                                                   \
   /* Java runtime version access */                                                               \
-  template(sun_misc_Version,                          "sun/misc/Version")                         \
+  template(java_lang_VersionProps,                    "java/lang/VersionProps")                   \
   template(java_runtime_name_name,                    "java_runtime_name")                        \
   template(java_runtime_version_name,                 "java_runtime_version")                     \
                                                                                                   \
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -39,6 +39,7 @@
 #include "gc/shared/genOopClosures.inline.hpp"
 #include "gc/shared/generation.hpp"
 #include "gc/shared/plab.inline.hpp"
+#include "gc/shared/preservedMarks.inline.hpp"
 #include "gc/shared/referencePolicy.hpp"
 #include "gc/shared/space.hpp"
 #include "gc/shared/spaceDecorator.hpp"
@@ -64,6 +65,7 @@
                                        int thread_num_,
                                        ObjToScanQueueSet* work_queue_set_,
                                        Stack<oop, mtGC>* overflow_stacks_,
+                                       PreservedMarks* preserved_marks_,
                                        size_t desired_plab_sz_,
                                        ParallelTaskTerminator& term_) :
   _to_space(to_space_),
@@ -73,6 +75,7 @@
   _work_queue(work_queue_set_->queue(thread_num_)),
   _to_space_full(false),
   _overflow_stack(overflow_stacks_ ? overflow_stacks_ + thread_num_ : NULL),
+  _preserved_marks(preserved_marks_),
   _ageTable(false), // false ==> not the global age table, no perf data.
   _to_space_alloc_buffer(desired_plab_sz_),
   _to_space_closure(young_gen_, this),
@@ -286,6 +289,7 @@
                         Generation&             old_gen,
                         ObjToScanQueueSet&      queue_set,
                         Stack<oop, mtGC>*       overflow_stacks_,
+                        PreservedMarksSet&      preserved_marks_set,
                         size_t                  desired_plab_sz,
                         ParallelTaskTerminator& term);
 
@@ -322,6 +326,7 @@
                                              Generation& old_gen,
                                              ObjToScanQueueSet& queue_set,
                                              Stack<oop, mtGC>* overflow_stacks,
+                                             PreservedMarksSet& preserved_marks_set,
                                              size_t desired_plab_sz,
                                              ParallelTaskTerminator& term)
   : ResourceArray(sizeof(ParScanThreadState), num_threads),
@@ -336,7 +341,8 @@
   for (int i = 0; i < num_threads; ++i) {
     new ((ParScanThreadState*)_data + i)
         ParScanThreadState(&to_space, &young_gen, &old_gen, i, &queue_set,
-                           overflow_stacks, desired_plab_sz, term);
+                           overflow_stacks, preserved_marks_set.get(i),
+                           desired_plab_sz, term);
   }
 }
 
@@ -905,12 +911,16 @@
   // Set the correct parallelism (number of queues) in the reference processor
   ref_processor()->set_active_mt_degree(active_workers);
 
+  // Need to initialize the preserved marks before the ThreadStateSet c'tor.
+  _preserved_marks_set.init(active_workers);
+
   // Always set the terminator for the active number of workers
   // because only those workers go through the termination protocol.
   ParallelTaskTerminator _term(active_workers, task_queues());
   ParScanThreadStateSet thread_state_set(active_workers,
                                          *to(), *this, *_old_gen, *task_queues(),
-                                         _overflow_stacks, desired_plab_sz(), _term);
+                                         _overflow_stacks, _preserved_marks_set,
+                                         desired_plab_sz(), _term);
 
   thread_state_set.reset(active_workers, promotion_failed());
 
@@ -993,6 +1003,7 @@
   } else {
     handle_promotion_failed(gch, thread_state_set);
   }
+  _preserved_marks_set.reclaim();
   // set new iteration safe limit for the survivor spaces
   from()->set_concurrent_iteration_safe_limit(from()->top());
   to()->set_concurrent_iteration_safe_limit(to()->top());
@@ -1070,15 +1081,6 @@
   return forward_ptr;
 }
 
-void ParNewGeneration::preserve_mark_if_necessary(oop obj, markOop m) {
-  if (m->must_be_preserved_for_promotion_failure(obj)) {
-    // We should really have separate per-worker stacks, rather
-    // than use locking of a common pair of stacks.
-    MutexLocker ml(ParGCRareEvent_lock);
-    preserve_mark(obj, m);
-  }
-}
-
 // Multiple GC threads may try to promote an object.  If the object
 // is successfully promoted, a forwarding pointer will be installed in
 // the object in the young generation.  This method claims the right
@@ -1136,7 +1138,7 @@
       _promotion_failed = true;
       new_obj = old;
 
-      preserve_mark_if_necessary(old, m);
+      par_scan_state->preserved_marks()->push_if_necessary(old, m);
       par_scan_state->register_promotion_failure(sz);
     }
 
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -30,6 +30,7 @@
 #include "gc/shared/copyFailedInfo.hpp"
 #include "gc/shared/gcTrace.hpp"
 #include "gc/shared/plab.hpp"
+#include "gc/shared/preservedMarks.hpp"
 #include "gc/shared/taskqueue.hpp"
 #include "memory/padded.hpp"
 
@@ -65,6 +66,7 @@
  private:
   ObjToScanQueue *_work_queue;
   Stack<oop, mtGC>* const _overflow_stack;
+  PreservedMarks* const _preserved_marks;
 
   PLAB _to_space_alloc_buffer;
 
@@ -128,6 +130,7 @@
                      Generation* old_gen_, int thread_num_,
                      ObjToScanQueueSet* work_queue_set_,
                      Stack<oop, mtGC>* overflow_stacks_,
+                     PreservedMarks* preserved_marks_,
                      size_t desired_plab_sz_,
                      ParallelTaskTerminator& term_);
 
@@ -136,6 +139,8 @@
 
   ObjToScanQueue* work_queue() { return _work_queue; }
 
+  PreservedMarks* preserved_marks() const { return _preserved_marks; }
+
   PLAB* to_space_alloc_buffer() {
     return &_to_space_alloc_buffer;
   }
@@ -331,10 +336,6 @@
   static oop real_forwardee_slow(oop obj);
   static void waste_some_time();
 
-  // Preserve the mark of "obj", if necessary, in preparation for its mark
-  // word being overwritten with a self-forwarding-pointer.
-  void preserve_mark_if_necessary(oop obj, markOop m);
-
   void handle_promotion_failed(GenCollectedHeap* gch, ParScanThreadStateSet& thread_state_set);
 
  protected:
--- a/hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -89,8 +89,6 @@
 void ConcurrentG1RefineThread::activate() {
   MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag);
   if (!is_primary()) {
-    log_debug(gc, refine)("G1-Refine-activated worker %d, on threshold %d, current %d",
-                          _worker_id, _threshold, JavaThread::dirty_card_queue_set().completed_buffers_num());
     set_active(true);
   } else {
     DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
@@ -102,8 +100,6 @@
 void ConcurrentG1RefineThread::deactivate() {
   MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag);
   if (!is_primary()) {
-    log_debug(gc, refine)("G1-Refine-deactivated worker %d, off threshold %d, current %d",
-                          _worker_id, _deactivation_threshold, JavaThread::dirty_card_queue_set().completed_buffers_num());
     set_active(false);
   } else {
     DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
@@ -130,9 +126,12 @@
       break;
     }
 
+    DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
+    log_debug(gc, refine)("Activated %d, on threshold: %d, current: %d",
+                          _worker_id, _threshold, dcqs.completed_buffers_num());
+
     {
       SuspendibleThreadSetJoiner sts_join;
-      DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
 
       do {
         int curr_buffer_num = (int)dcqs.completed_buffers_num();
@@ -142,24 +141,19 @@
           dcqs.set_completed_queue_padding(0);
         }
 
-        if (!is_primary() && curr_buffer_num <= _deactivation_threshold) {
-          // If the number of the buffer has fallen below our threshold
-          // we should deactivate. The predecessor will reactivate this
-          // thread should the number of the buffers cross the threshold again.
-          deactivate();
-          break;
-        }
-
         // Check if we need to activate the next thread.
         if (_next != NULL && !_next->is_active() && curr_buffer_num > _next->_threshold) {
           _next->activate();
         }
-      } while (dcqs.apply_closure_to_completed_buffer(_refine_closure, _worker_id + _worker_id_offset, cg1r()->green_zone()));
+      } while (dcqs.apply_closure_to_completed_buffer(_refine_closure,
+                                                      _worker_id + _worker_id_offset,
+                                                      _deactivation_threshold,
+                                                      false /* during_pause */));
 
-      // We can exit the loop above while being active if there was a yield request.
-      if (is_active()) {
-        deactivate();
-      }
+      deactivate();
+      log_debug(gc, refine)("Deactivated %d, off threshold: %d, current: %d",
+                            _worker_id, _deactivation_threshold,
+                            dcqs.completed_buffers_num());
     }
 
     if (os::supports_vtime()) {
@@ -169,7 +163,7 @@
     }
   }
 
-  log_debug(gc, refine)("G1-Refine-stop");
+  log_debug(gc, refine)("Stopping %d", _worker_id);
 }
 
 void ConcurrentG1RefineThread::stop() {
--- a/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -228,37 +228,30 @@
   return nd;
 }
 
-bool DirtyCardQueueSet::apply_closure_to_completed_buffer_helper(CardTableEntryClosure* cl,
-                                                                 uint worker_i,
-                                                                 BufferNode* nd) {
-  if (nd != NULL) {
-    void **buf = BufferNode::make_buffer_from_node(nd);
-    size_t index = nd->index();
-    bool b =
-      DirtyCardQueue::apply_closure_to_buffer(cl, buf,
-                                              index, _sz,
-                                              true, worker_i);
-    if (b) {
-      deallocate_buffer(buf);
-      return true;  // In normal case, go on to next buffer.
-    } else {
-      enqueue_complete_buffer(buf, index);
-      return false;
-    }
-  } else {
-    return false;
-  }
-}
-
 bool DirtyCardQueueSet::apply_closure_to_completed_buffer(CardTableEntryClosure* cl,
                                                           uint worker_i,
                                                           int stop_at,
                                                           bool during_pause) {
   assert(!during_pause || stop_at == 0, "Should not leave any completed buffers during a pause");
   BufferNode* nd = get_completed_buffer(stop_at);
-  bool res = apply_closure_to_completed_buffer_helper(cl, worker_i, nd);
-  if (res) Atomic::inc(&_processed_buffers_rs_thread);
-  return res;
+  if (nd == NULL) {
+    return false;
+  } else {
+    void** buf = BufferNode::make_buffer_from_node(nd);
+    size_t index = nd->index();
+    if (DirtyCardQueue::apply_closure_to_buffer(cl,
+                                                buf, index, _sz,
+                                                true, worker_i)) {
+      // Done with fully processed buffer.
+      deallocate_buffer(buf);
+      Atomic::inc(&_processed_buffers_rs_thread);
+      return true;
+    } else {
+      // Return partially processed buffer to the queue.
+      enqueue_complete_buffer(buf, index);
+      return false;
+    }
+  }
 }
 
 void DirtyCardQueueSet::apply_closure_to_all_completed_buffers(CardTableEntryClosure* cl) {
--- a/hotspot/src/share/vm/gc/g1/dirtyCardQueue.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/g1/dirtyCardQueue.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -133,14 +133,9 @@
   // partially completed buffer (with its processed elements set to NULL)
   // is returned to the completed buffer set, and this call returns false.
   bool apply_closure_to_completed_buffer(CardTableEntryClosure* cl,
-                                         uint worker_i = 0,
-                                         int stop_at = 0,
-                                         bool during_pause = false);
-
-  // Helper routine for the above.
-  bool apply_closure_to_completed_buffer_helper(CardTableEntryClosure* cl,
-                                                uint worker_i,
-                                                BufferNode* nd);
+                                         uint worker_i,
+                                         int stop_at,
+                                         bool during_pause);
 
   BufferNode* get_completed_buffer(int stop_at);
 
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -2777,12 +2777,6 @@
 }
 
 void G1CollectedHeap::print_tracing_info() const {
-  // We'll overload this to mean "trace GC pause statistics."
-  if (TraceYoungGenTime || TraceOldGenTime) {
-    // The "G1CollectorPolicy" is keeping track of these stats, so delegate
-    // to that.
-    g1_policy()->print_tracing_info();
-  }
   g1_rem_set()->print_summary_info();
   concurrent_mark()->print_summary_info();
   g1_policy()->print_yg_surv_rate_info();
@@ -2908,7 +2902,6 @@
                                                bool* succeeded,
                                                GCCause::Cause gc_cause) {
   assert_heap_not_locked_and_not_at_safepoint();
-  g1_policy()->record_stop_world_start();
   VM_G1IncCollectionPause op(gc_count_before,
                              word_size,
                              false, /* should_initiate_conc_mark */
@@ -3242,10 +3235,6 @@
 
     GCTraceCPUTime tcpu;
 
-    uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
-                                                                  workers()->active_workers(),
-                                                                  Threads::number_of_non_daemon_threads());
-    workers()->set_active_workers(active_workers);
     FormatBuffer<> gc_string("Pause ");
     if (collector_state()->during_initial_mark_pause()) {
       gc_string.append("Initial Mark");
@@ -3256,6 +3245,11 @@
     }
     GCTraceTime(Info, gc) tm(gc_string, NULL, gc_cause(), true);
 
+    uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
+                                                                  workers()->active_workers(),
+                                                                  Threads::number_of_non_daemon_threads());
+    workers()->set_active_workers(active_workers);
+
     g1_policy()->note_gc_start(active_workers);
 
     TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -81,10 +81,8 @@
 
 G1CollectorPolicy::G1CollectorPolicy() :
   _predictor(G1ConfidencePercent / 100.0),
-  _parallel_gc_threads(ParallelGCThreads),
 
   _recent_gc_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)),
-  _stop_world_start(0.0),
 
   _concurrent_mark_remark_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)),
   _concurrent_mark_cleanup_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)),
@@ -129,7 +127,6 @@
   _inc_cset_head(NULL),
   _inc_cset_tail(NULL),
   _inc_cset_bytes_used_before(0),
-  _inc_cset_max_finger(NULL),
   _inc_cset_recorded_rs_lengths(0),
   _inc_cset_recorded_rs_lengths_diffs(0),
   _inc_cset_predicted_elapsed_time_ms(0.0),
@@ -172,9 +169,9 @@
   _prev_collection_pause_end_ms = os::elapsedTime() * 1000.0;
   clear_ratio_check_data();
 
-  _phase_times = new G1GCPhaseTimes(_parallel_gc_threads);
+  _phase_times = new G1GCPhaseTimes(ParallelGCThreads);
 
-  int index = MIN2(_parallel_gc_threads - 1, 7);
+  int index = MIN2(ParallelGCThreads - 1, 7u);
 
   _rs_length_diff_seq->add(rs_length_diff_defaults[index]);
   _cost_per_card_ms_seq->add(cost_per_card_ms_defaults[index]);
@@ -872,8 +869,6 @@
   double full_gc_time_sec = end_sec - _full_collection_start_sec;
   double full_gc_time_ms = full_gc_time_sec * 1000.0;
 
-  _trace_old_gen_time_data.record_full_collection(full_gc_time_ms);
-
   update_recent_gc_times(end_sec, full_gc_time_ms);
 
   collector_state()->set_full_collection(false);
@@ -904,10 +899,6 @@
   record_pause(FullGC, _full_collection_start_sec, end_sec);
 }
 
-void G1CollectorPolicy::record_stop_world_start() {
-  _stop_world_start = os::elapsedTime();
-}
-
 void G1CollectorPolicy::record_collection_pause_start(double start_time_sec) {
   // We only need to do this here as the policy will only be applied
   // to the GC we're about to start. so, no point is calculating this
@@ -918,10 +909,6 @@
          "sanity, used: " SIZE_FORMAT " recalculate_used: " SIZE_FORMAT,
          _g1->used(), _g1->recalculate_used());
 
-  double s_w_t_ms = (start_time_sec - _stop_world_start) * 1000.0;
-  _trace_young_gen_time_data.record_start_collection(s_w_t_ms);
-  _stop_world_start = 0.0;
-
   phase_times()->record_cur_collection_start_sec(start_time_sec);
   _pending_cards = _g1->pending_card_num();
 
@@ -973,13 +960,6 @@
   collector_state()->set_in_marking_window(false);
 }
 
-void G1CollectorPolicy::record_concurrent_pause() {
-  if (_stop_world_start > 0.0) {
-    double yield_ms = (os::elapsedTime() - _stop_world_start) * 1000.0;
-    _trace_young_gen_time_data.record_yield_time(yield_ms);
-  }
-}
-
 double G1CollectorPolicy::average_time_ms(G1GCPhaseTimes::GCParPhases phase) const {
   return phase_times()->average_time_ms(phase);
 }
@@ -1064,7 +1044,6 @@
   }
 
   if (update_stats) {
-    _trace_young_gen_time_data.record_end_collection(pause_time_ms, phase_times());
     // We maintain the invariant that all objects allocated by mutator
     // threads will be allocated out of eden regions. So, we can use
     // the eden region number allocated since the previous GC to
@@ -1654,11 +1633,6 @@
   return expand_bytes;
 }
 
-void G1CollectorPolicy::print_tracing_info() const {
-  _trace_young_gen_time_data.print();
-  _trace_old_gen_time_data.print();
-}
-
 void G1CollectorPolicy::print_yg_surv_rate_info() const {
 #ifndef PRODUCT
   _short_lived_surv_rate_group->print_surv_rate_summary();
@@ -1869,7 +1843,6 @@
   _inc_cset_tail = NULL;
   _inc_cset_bytes_used_before = 0;
 
-  _inc_cset_max_finger = 0;
   _inc_cset_recorded_rs_lengths = 0;
   _inc_cset_recorded_rs_lengths_diffs = 0;
   _inc_cset_predicted_elapsed_time_ms = 0.0;
@@ -1981,9 +1954,6 @@
   size_t rs_length = hr->rem_set()->occupied();
   add_to_incremental_cset_info(hr, rs_length);
 
-  HeapWord* hr_end = hr->end();
-  _inc_cset_max_finger = MAX2(_inc_cset_max_finger, hr_end);
-
   assert(!hr->in_collection_set(), "invariant");
   _g1->register_young_region_with_cset(hr);
   assert(hr->next_in_collection_set() == NULL, "invariant");
@@ -2190,12 +2160,6 @@
 
   collector_state()->set_last_gc_was_young(collector_state()->gcs_are_young());
 
-  if (collector_state()->last_gc_was_young()) {
-    _trace_young_gen_time_data.increment_young_collection_count();
-  } else {
-    _trace_young_gen_time_data.increment_mixed_collection_count();
-  }
-
   // The young list is laid with the survivor regions from the previous
   // pause are appended to the RHS of the young list, i.e.
   //   [Newly Young Regions ++ Survivors from last pause].
@@ -2335,127 +2299,3 @@
   double non_young_end_time_sec = os::elapsedTime();
   phase_times()->record_non_young_cset_choice_time_ms((non_young_end_time_sec - non_young_start_time_sec) * 1000.0);
 }
-
-void TraceYoungGenTimeData::record_start_collection(double time_to_stop_the_world_ms) {
-  if(TraceYoungGenTime) {
-    _all_stop_world_times_ms.add(time_to_stop_the_world_ms);
-  }
-}
-
-void TraceYoungGenTimeData::record_yield_time(double yield_time_ms) {
-  if(TraceYoungGenTime) {
-    _all_yield_times_ms.add(yield_time_ms);
-  }
-}
-
-void TraceYoungGenTimeData::record_end_collection(double pause_time_ms, G1GCPhaseTimes* phase_times) {
-  if(TraceYoungGenTime) {
-    _total.add(pause_time_ms);
-    _other.add(pause_time_ms - phase_times->accounted_time_ms());
-    _root_region_scan_wait.add(phase_times->root_region_scan_wait_time_ms());
-    _parallel.add(phase_times->cur_collection_par_time_ms());
-    _ext_root_scan.add(phase_times->average_time_ms(G1GCPhaseTimes::ExtRootScan));
-    _satb_filtering.add(phase_times->average_time_ms(G1GCPhaseTimes::SATBFiltering));
-    _update_rs.add(phase_times->average_time_ms(G1GCPhaseTimes::UpdateRS));
-    _scan_rs.add(phase_times->average_time_ms(G1GCPhaseTimes::ScanRS));
-    _obj_copy.add(phase_times->average_time_ms(G1GCPhaseTimes::ObjCopy));
-    _termination.add(phase_times->average_time_ms(G1GCPhaseTimes::Termination));
-
-    double parallel_known_time = phase_times->average_time_ms(G1GCPhaseTimes::ExtRootScan) +
-      phase_times->average_time_ms(G1GCPhaseTimes::SATBFiltering) +
-      phase_times->average_time_ms(G1GCPhaseTimes::UpdateRS) +
-      phase_times->average_time_ms(G1GCPhaseTimes::ScanRS) +
-      phase_times->average_time_ms(G1GCPhaseTimes::ObjCopy) +
-      phase_times->average_time_ms(G1GCPhaseTimes::Termination);
-
-    double parallel_other_time = phase_times->cur_collection_par_time_ms() - parallel_known_time;
-    _parallel_other.add(parallel_other_time);
-    _clear_ct.add(phase_times->cur_clear_ct_time_ms());
-  }
-}
-
-void TraceYoungGenTimeData::increment_young_collection_count() {
-  if(TraceYoungGenTime) {
-    ++_young_pause_num;
-  }
-}
-
-void TraceYoungGenTimeData::increment_mixed_collection_count() {
-  if(TraceYoungGenTime) {
-    ++_mixed_pause_num;
-  }
-}
-
-void TraceYoungGenTimeData::print_summary(const char* str,
-                                          const NumberSeq* seq) const {
-  double sum = seq->sum();
-  tty->print_cr("%-27s = %8.2lf s (avg = %8.2lf ms)",
-                str, sum / 1000.0, seq->avg());
-}
-
-void TraceYoungGenTimeData::print_summary_sd(const char* str,
-                                             const NumberSeq* seq) const {
-  print_summary(str, seq);
-  tty->print_cr("%45s = %5d, std dev = %8.2lf ms, max = %8.2lf ms)",
-                "(num", seq->num(), seq->sd(), seq->maximum());
-}
-
-void TraceYoungGenTimeData::print() const {
-  if (!TraceYoungGenTime) {
-    return;
-  }
-
-  tty->print_cr("ALL PAUSES");
-  print_summary_sd("   Total", &_total);
-  tty->cr();
-  tty->cr();
-  tty->print_cr("   Young GC Pauses: %8d", _young_pause_num);
-  tty->print_cr("   Mixed GC Pauses: %8d", _mixed_pause_num);
-  tty->cr();
-
-  tty->print_cr("EVACUATION PAUSES");
-
-  if (_young_pause_num == 0 && _mixed_pause_num == 0) {
-    tty->print_cr("none");
-  } else {
-    print_summary_sd("   Evacuation Pauses", &_total);
-    print_summary("      Root Region Scan Wait", &_root_region_scan_wait);
-    print_summary("      Parallel Time", &_parallel);
-    print_summary("         Ext Root Scanning", &_ext_root_scan);
-    print_summary("         SATB Filtering", &_satb_filtering);
-    print_summary("         Update RS", &_update_rs);
-    print_summary("         Scan RS", &_scan_rs);
-    print_summary("         Object Copy", &_obj_copy);
-    print_summary("         Termination", &_termination);
-    print_summary("         Parallel Other", &_parallel_other);
-    print_summary("      Clear CT", &_clear_ct);
-    print_summary("      Other", &_other);
-  }
-  tty->cr();
-
-  tty->print_cr("MISC");
-  print_summary_sd("   Stop World", &_all_stop_world_times_ms);
-  print_summary_sd("   Yields", &_all_yield_times_ms);
-}
-
-void TraceOldGenTimeData::record_full_collection(double full_gc_time_ms) {
-  if (TraceOldGenTime) {
-    _all_full_gc_times.add(full_gc_time_ms);
-  }
-}
-
-void TraceOldGenTimeData::print() const {
-  if (!TraceOldGenTime) {
-    return;
-  }
-
-  if (_all_full_gc_times.num() > 0) {
-    tty->print("\n%4d full_gcs: total time = %8.2f s",
-      _all_full_gc_times.num(),
-      _all_full_gc_times.sum() / 1000.0);
-    tty->print_cr(" (avg = %8.2fms).", _all_full_gc_times.avg());
-    tty->print_cr("                     [std. dev = %8.2f ms, max = %8.2f ms]",
-      _all_full_gc_times.sd(),
-      _all_full_gc_times.maximum());
-  }
-}
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -45,52 +45,6 @@
 class G1IHOPControl;
 class G1YoungGenSizer;
 
-// TraceYoungGenTime collects data on _both_ young and mixed evacuation pauses
-// (the latter may contain non-young regions - i.e. regions that are
-// technically in old) while TraceOldGenTime collects data about full GCs.
-class TraceYoungGenTimeData : public CHeapObj<mtGC> {
- private:
-  unsigned  _young_pause_num;
-  unsigned  _mixed_pause_num;
-
-  NumberSeq _all_stop_world_times_ms;
-  NumberSeq _all_yield_times_ms;
-
-  NumberSeq _total;
-  NumberSeq _other;
-  NumberSeq _root_region_scan_wait;
-  NumberSeq _parallel;
-  NumberSeq _ext_root_scan;
-  NumberSeq _satb_filtering;
-  NumberSeq _update_rs;
-  NumberSeq _scan_rs;
-  NumberSeq _obj_copy;
-  NumberSeq _termination;
-  NumberSeq _parallel_other;
-  NumberSeq _clear_ct;
-
-  void print_summary(const char* str, const NumberSeq* seq) const;
-  void print_summary_sd(const char* str, const NumberSeq* seq) const;
-
-public:
-   TraceYoungGenTimeData() : _young_pause_num(0), _mixed_pause_num(0) {};
-  void record_start_collection(double time_to_stop_the_world_ms);
-  void record_yield_time(double yield_time_ms);
-  void record_end_collection(double pause_time_ms, G1GCPhaseTimes* phase_times);
-  void increment_young_collection_count();
-  void increment_mixed_collection_count();
-  void print() const;
-};
-
-class TraceOldGenTimeData : public CHeapObj<mtGC> {
- private:
-  NumberSeq _all_full_gc_times;
-
- public:
-  void record_full_collection(double full_gc_time_ms);
-  void print() const;
-};
-
 class G1CollectorPolicy: public CollectorPolicy {
  private:
   G1IHOPControl* _ihop_control;
@@ -107,13 +61,6 @@
   double get_new_prediction(TruncatedSeq const* seq) const;
   size_t get_new_size_prediction(TruncatedSeq const* seq) const;
 
-  // either equal to the number of parallel threads, if ParallelGCThreads
-  // has been set, or 1 otherwise
-  int _parallel_gc_threads;
-
-  // The number of GC threads currently active.
-  uintx _no_of_gc_threads;
-
   G1MMUTracker* _mmu_tracker;
 
   void initialize_alignments();
@@ -134,11 +81,6 @@
   double _ratio_over_threshold_sum;
   uint _pauses_since_start;
 
-  TraceYoungGenTimeData _trace_young_gen_time_data;
-  TraceOldGenTimeData   _trace_old_gen_time_data;
-
-  double _stop_world_start;
-
   uint _young_list_target_length;
   uint _young_list_fixed_length;
 
@@ -212,9 +154,6 @@
                                     double update_rs_processed_buffers,
                                     double goal_ms);
 
-  uintx no_of_gc_threads() { return _no_of_gc_threads; }
-  void set_no_of_gc_threads(uintx v) { _no_of_gc_threads = v; }
-
   double _pause_time_target_ms;
 
   size_t _pending_cards;
@@ -389,9 +328,6 @@
   // an evacuation pause.
   size_t _inc_cset_bytes_used_before;
 
-  // Used to record the highest end of heap region in collection set
-  HeapWord* _inc_cset_max_finger;
-
   // The RSet lengths recorded for regions in the CSet. It is updated
   // by the thread that adds a new region to the CSet. We assume that
   // only one thread can be allocating a new CSet region (currently,
@@ -573,9 +509,6 @@
 
   virtual void print_phases();
 
-  void record_stop_world_start();
-  void record_concurrent_pause();
-
   // Record how much space we copied during a GC. This is typically
   // called when a GC alloc region is being retired.
   void record_bytes_copied_during_gc(size_t bytes) {
@@ -685,9 +618,6 @@
   // Clear ratio tracking data used by expansion_amount().
   void clear_ratio_check_data();
 
-  // Print tracing information.
-  void print_tracing_info() const;
-
   // Print stats on young survival ratio
   void print_yg_surv_rate_info() const;
 
--- a/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -2662,9 +2662,6 @@
 // We take a break if someone is trying to stop the world.
 bool G1ConcurrentMark::do_yield_check(uint worker_id) {
   if (SuspendibleThreadSet::should_yield()) {
-    if (worker_id == 0) {
-      _g1h->g1_policy()->record_concurrent_pause();
-    }
     SuspendibleThreadSet::yield();
     return true;
   } else {
--- a/hotspot/src/share/vm/gc/g1/g1EvacFailure.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/g1/g1EvacFailure.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -27,25 +27,12 @@
 
 #include "gc/g1/g1OopClosures.hpp"
 #include "gc/g1/heapRegionManager.hpp"
+ #include "gc/shared/preservedMarks.hpp"
 #include "gc/shared/workgroup.hpp"
 #include "utilities/globalDefinitions.hpp"
 
 class G1CollectedHeap;
 
-class OopAndMarkOop {
-  oop _o;
-  markOop _m;
- public:
-  OopAndMarkOop(oop obj, markOop m) : _o(obj), _m(m) {
-  }
-
-  void set_mark() {
-    _o->set_mark(_m);
-  }
-};
-
-typedef Stack<OopAndMarkOop,mtGC> OopAndMarkOopStack;
-
 // Task to fixup self-forwarding pointers
 // installed as a result of an evacuation failure.
 class G1ParRemoveSelfForwardPtrsTask: public AbstractGangTask {
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -36,6 +36,7 @@
 #include "gc/shared/genCollectedHeap.hpp"
 #include "gc/shared/genOopClosures.inline.hpp"
 #include "gc/shared/generationSpec.hpp"
+#include "gc/shared/preservedMarks.inline.hpp"
 #include "gc/shared/referencePolicy.hpp"
 #include "gc/shared/space.inline.hpp"
 #include "gc/shared/spaceDecorator.hpp"
@@ -184,6 +185,7 @@
                                    size_t initial_size,
                                    const char* policy)
   : Generation(rs, initial_size),
+    _preserved_marks_set(false /* in_c_heap */),
     _promo_failure_drain_in_progress(false),
     _should_allocate_from_space(false)
 {
@@ -602,6 +604,8 @@
 
   age_table()->clear();
   to()->clear(SpaceDecorator::Mangle);
+  // The preserved marks should be empty at the start of the GC.
+  _preserved_marks_set.init(1);
 
   gch->rem_set()->prepare_for_younger_refs_iterate(false);
 
@@ -704,6 +708,8 @@
     // Reset the PromotionFailureALot counters.
     NOT_PRODUCT(gch->reset_promotion_should_fail();)
   }
+  // We should have processed and cleared all the preserved marks.
+  _preserved_marks_set.reclaim();
   // set new iteration safe limit for the survivor spaces
   from()->set_concurrent_iteration_safe_limit(from()->top());
   to()->set_concurrent_iteration_safe_limit(to()->top());
@@ -721,13 +727,6 @@
   gc_tracer.report_gc_end(_gc_timer->gc_end(), _gc_timer->time_partitions());
 }
 
-class RemoveForwardPointerClosure: public ObjectClosure {
-public:
-  void do_object(oop obj) {
-    obj->init_mark();
-  }
-};
-
 void DefNewGeneration::init_assuming_no_promotion_failure() {
   _promotion_failed = false;
   _promotion_failed_info.reset();
@@ -735,33 +734,12 @@
 }
 
 void DefNewGeneration::remove_forwarding_pointers() {
-  RemoveForwardPointerClosure rspc;
+  RemoveForwardedPointerClosure rspc;
   eden()->object_iterate(&rspc);
   from()->object_iterate(&rspc);
 
   // Now restore saved marks, if any.
-  assert(_objs_with_preserved_marks.size() == _preserved_marks_of_objs.size(),
-         "should be the same");
-  while (!_objs_with_preserved_marks.is_empty()) {
-    oop obj   = _objs_with_preserved_marks.pop();
-    markOop m = _preserved_marks_of_objs.pop();
-    obj->set_mark(m);
-  }
-  _objs_with_preserved_marks.clear(true);
-  _preserved_marks_of_objs.clear(true);
-}
-
-void DefNewGeneration::preserve_mark(oop obj, markOop m) {
-  assert(_promotion_failed && m->must_be_preserved_for_promotion_failure(obj),
-         "Oversaving!");
-  _objs_with_preserved_marks.push(obj);
-  _preserved_marks_of_objs.push(m);
-}
-
-void DefNewGeneration::preserve_mark_if_necessary(oop obj, markOop m) {
-  if (m->must_be_preserved_for_promotion_failure(obj)) {
-    preserve_mark(obj, m);
-  }
+  _preserved_marks_set.restore();
 }
 
 void DefNewGeneration::handle_promotion_failure(oop old) {
@@ -769,7 +747,7 @@
 
   _promotion_failed = true;
   _promotion_failed_info.register_copy_failure(old->size());
-  preserve_mark_if_necessary(old, old->mark());
+  _preserved_marks_set.get()->push_if_necessary(old, old->mark());
   // forward to self
   old->forward_to(old);
 
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -30,6 +30,7 @@
 #include "gc/shared/copyFailedInfo.hpp"
 #include "gc/shared/generation.hpp"
 #include "gc/shared/generationCounters.hpp"
+#include "gc/shared/preservedMarks.hpp"
 #include "utilities/stack.hpp"
 
 class ContiguousSpace;
@@ -87,15 +88,8 @@
   // therefore we must remove their forwarding pointers.
   void remove_forwarding_pointers();
 
-  // Preserve the mark of "obj", if necessary, in preparation for its mark
-  // word being overwritten with a self-forwarding-pointer.
-  void   preserve_mark_if_necessary(oop obj, markOop m);
-  void   preserve_mark(oop obj, markOop m);    // work routine used by the above
-
-  // Together, these keep <object with a preserved mark, mark value> pairs.
-  // They should always contain the same number of elements.
-  Stack<oop, mtGC>     _objs_with_preserved_marks;
-  Stack<markOop, mtGC> _preserved_marks_of_objs;
+  // Preserved marks
+  PreservedMarksSet _preserved_marks_set;
 
   // Promotion failure handling
   ExtendedOopClosure *_promo_failure_scan_stack_closure;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/shared/preservedMarks.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,93 @@
+/*
+ * 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 "gc/shared/preservedMarks.inline.hpp"
+#include "memory/allocation.inline.hpp"
+#include "oops/oop.inline.hpp"
+
+void PreservedMarks::restore() {
+  // First, iterate over the stack and restore all marks.
+  StackIterator<OopAndMarkOop, mtGC> iter(_stack);
+  while (!iter.is_empty()) {
+    OopAndMarkOop elem = iter.next();
+    elem.set_mark();
+  }
+
+  // Second, reclaim all the stack memory
+  _stack.clear(true /* clear_cache */);
+}
+
+void RemoveForwardedPointerClosure::do_object(oop obj) {
+  if (obj->is_forwarded()) {
+    obj->init_mark();
+  }
+}
+
+void PreservedMarksSet::init(uint num) {
+  assert(_stacks == NULL && _num == 0, "do not re-initialize");
+  assert(num > 0, "pre-condition");
+  if (_in_c_heap) {
+    _stacks = NEW_C_HEAP_ARRAY(Padded<PreservedMarks>, num, mtGC);
+  } else {
+    _stacks = NEW_RESOURCE_ARRAY(Padded<PreservedMarks>, num);
+  }
+  for (uint i = 0; i < num; i += 1) {
+    ::new (_stacks + i) PreservedMarks();
+  }
+  _num = num;
+
+  assert_empty();
+}
+
+void PreservedMarksSet::restore() {
+  for (uint i = 0; i < _num; i += 1) {
+    get(i)->restore();
+  }
+}
+
+void PreservedMarksSet::reclaim() {
+  assert_empty();
+
+  for (uint i = 0; i < _num; i += 1) {
+    _stacks[i].~Padded<PreservedMarks>();
+  }
+
+  if (_in_c_heap) {
+    FREE_C_HEAP_ARRAY(Padded<PreservedMarks>, _stacks);
+  } else {
+    // the array was resource-allocated, so nothing to do
+  }
+  _stacks = NULL;
+  _num = 0;
+}
+
+#ifndef PRODUCT
+void PreservedMarksSet::assert_empty() {
+  assert(_stacks != NULL && _num > 0, "should have been initialized");
+  for (uint i = 0; i < _num; i += 1) {
+    assert(get(i)->is_empty(), "stack should be empty");
+  }
+}
+#endif // ndef PRODUCT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/shared/preservedMarks.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,111 @@
+/*
+ * 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.
+ *
+ */
+
+#ifndef SHARE_VM_GC_SHARED_PRESERVEDMARKS_HPP
+#define SHARE_VM_GC_SHARED_PRESERVEDMARKS_HPP
+
+#include "memory/allocation.hpp"
+#include "memory/padded.hpp"
+#include "oops/oop.hpp"
+#include "utilities/stack.hpp"
+
+class OopAndMarkOop {
+private:
+  oop _o;
+  markOop _m;
+
+public:
+  OopAndMarkOop(oop obj, markOop m) : _o(obj), _m(m) { }
+
+  void set_mark() const {
+    _o->set_mark(_m);
+  }
+};
+typedef Stack<OopAndMarkOop, mtGC> OopAndMarkOopStack;
+
+class PreservedMarks VALUE_OBJ_CLASS_SPEC {
+private:
+  OopAndMarkOopStack _stack;
+
+  inline bool should_preserve_mark(oop obj, markOop m) const;
+  inline void push(oop obj, markOop m);
+
+public:
+  bool is_empty() const { return _stack.is_empty(); }
+  inline void push_if_necessary(oop obj, markOop m);
+  // Iterate over the stack, restore the preserved marks, then reclaim
+  // the memory taken up by stack chunks.
+  void restore();
+  ~PreservedMarks() { assert(is_empty(), "should have been cleared"); }
+};
+
+class RemoveForwardedPointerClosure: public ObjectClosure {
+public:
+  virtual void do_object(oop obj);
+};
+
+class PreservedMarksSet VALUE_OBJ_CLASS_SPEC {
+private:
+  // true -> _stacks will be allocated in the C heap
+  // false -> _stacks will be allocated in the resource arena
+  const bool _in_c_heap;
+
+  // Number of stacks we have allocated (typically, one stack per GC worker).
+  // This should be >= 1 if the stacks have been initialized,
+  // or == 0 if they have not.
+  uint _num;
+
+  // Stack array (typically, one stack per GC worker) of length _num.
+  // This should be != NULL if the stacks have been initialized,
+  // or == NULL if they have not.
+  Padded<PreservedMarks>* _stacks;
+
+public:
+  // Return the i'th stack.
+  PreservedMarks* get(uint i = 0) const {
+    assert(_num > 0 && _stacks != NULL, "stacks should have been initialized");
+    assert(i < _num, "pre-condition");
+    return (_stacks + i);
+  }
+
+  // Allocate stack array.
+  void init(uint num);
+  // Iterate over all stacks, restore all preserved marks, then
+  // reclaim the memory taken up by stack chunks.
+  void restore();
+  // Reclaim stack array.
+  void reclaim();
+
+  // Assert all the stacks are empty.
+  void assert_empty() PRODUCT_RETURN;
+
+  PreservedMarksSet(bool in_c_heap)
+      : _in_c_heap(in_c_heap), _num(0), _stacks(NULL) { }
+
+  ~PreservedMarksSet() {
+    assert(_stacks == NULL && _num == 0, "stacks should have been reclaimed");
+  }
+};
+
+#endif // SHARE_VM_GC_SHARED_PRESERVEDMARKS_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc/shared/preservedMarks.inline.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,48 @@
+/*
+ * 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 "gc/shared/preservedMarks.hpp"
+#include "oops/markOop.inline.hpp"
+#include "utilities/stack.inline.hpp"
+
+#ifndef SHARE_VM_GC_SHARED_PRESERVEDMARKS_INLINE_HPP
+#define SHARE_VM_GC_SHARED_PRESERVEDMARKS_INLINE_HPP
+
+inline bool PreservedMarks::should_preserve_mark(oop obj, markOop m) const {
+  return m->must_be_preserved_for_promotion_failure(obj);
+}
+
+inline void PreservedMarks::push(oop obj, markOop m) {
+  assert(should_preserve_mark(obj, m), "pre-condition");
+  OopAndMarkOop elem(obj, m);
+  _stack.push(elem);
+}
+
+inline void PreservedMarks::push_if_necessary(oop obj, markOop m) {
+  if (should_preserve_mark(obj, m)) {
+    push(obj, m);
+  }
+}
+
+#endif // SHARE_VM_GC_SHARED_PRESERVEDMARKS_INLINE_HPP
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -339,7 +339,7 @@
   // all linked Reference objects. Note that it is important to not dirty any
   // cards during reference processing since this will cause card table
   // verification to fail for G1.
-  log_develop_trace(gc, ref)("ReferenceProcessor::enqueue_discovered_reflist list " INTPTR_FORMAT, p2i(refs_list.head()));
+  log_develop_trace(gc, ref)("ReferenceProcessor::enqueue_discovered_reflist list " INTPTR_FORMAT, p2i(&refs_list));
 
   oop obj = NULL;
   oop next_d = refs_list.head();
@@ -502,7 +502,7 @@
   // Close the reachable set
   complete_gc->do_void();
   log_develop_trace(gc, ref)(" Dropped " SIZE_FORMAT " dead Refs out of " SIZE_FORMAT " discovered Refs by policy, from list " INTPTR_FORMAT,
-                             iter.removed(), iter.processed(), p2i(refs_list.head()));
+                             iter.removed(), iter.processed(), p2i(&refs_list));
     }
 
 // Traverse the list and remove any Refs that are not active, or
@@ -536,7 +536,7 @@
     if (iter.processed() > 0) {
       log_develop_trace(gc, ref)(" Dropped " SIZE_FORMAT " active Refs out of " SIZE_FORMAT
         " Refs in discovered list " INTPTR_FORMAT,
-        iter.removed(), iter.processed(), p2i(refs_list.head()));
+        iter.removed(), iter.processed(), p2i(&refs_list));
     }
   )
 }
@@ -575,7 +575,7 @@
     if (iter.processed() > 0) {
       log_develop_trace(gc, ref)(" Dropped " SIZE_FORMAT " active Refs out of " SIZE_FORMAT
         " Refs in discovered list " INTPTR_FORMAT,
-        iter.removed(), iter.processed(), p2i(refs_list.head()));
+        iter.removed(), iter.processed(), p2i(&refs_list));
     }
   )
 }
@@ -1198,7 +1198,7 @@
   NOT_PRODUCT(
     if (iter.processed() > 0) {
       log_develop_trace(gc, ref)(" Dropped " SIZE_FORMAT " Refs out of " SIZE_FORMAT " Refs in discovered list " INTPTR_FORMAT,
-        iter.removed(), iter.processed(), p2i(refs_list.head()));
+        iter.removed(), iter.processed(), p2i(&refs_list));
     }
   )
 }
--- a/hotspot/src/share/vm/gc/shared/workgroup.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/gc/shared/workgroup.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -29,6 +29,7 @@
 #include "runtime/globals.hpp"
 #include "runtime/thread.hpp"
 #include "gc/shared/gcId.hpp"
+#include "logging/log.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/globalDefinitions.hpp"
 
@@ -151,6 +152,7 @@
     _active_workers = MAX2(1U, _active_workers);
     assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers,
            "Unless dynamic should use total workers");
+    log_info(gc, task)("GC Workers: %d", _active_workers);
   }
 
   // Return the Ith worker.
--- a/hotspot/src/share/vm/interpreter/cppInterpreter.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/interpreter/cppInterpreter.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -27,6 +27,7 @@
 #include "interpreter/cppInterpreterGenerator.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
+#include "runtime/logTimer.hpp"
 
 #ifdef CC_INTERP
 
@@ -42,7 +43,7 @@
 
   // generate interpreter
   { ResourceMark rm;
-    TraceTime timer("Interpreter generation", TraceStartupTime);
+    TraceStartupTime timer("Interpreter generation");
     int code_size = InterpreterCodeSize;
     NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space
     _code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
--- a/hotspot/src/share/vm/interpreter/templateInterpreter.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/interpreter/templateInterpreter.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -31,6 +31,7 @@
 #include "interpreter/templateInterpreterGenerator.hpp"
 #include "interpreter/templateTable.hpp"
 #include "memory/resourceArea.hpp"
+#include "runtime/logTimer.hpp"
 
 #ifndef CC_INTERP
 
@@ -48,7 +49,7 @@
 
   // generate interpreter
   { ResourceMark rm;
-    TraceTime timer("Interpreter generation", TraceStartupTime);
+    TraceStartupTime timer("Interpreter generation");
     int code_size = InterpreterCodeSize;
     NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space
 #if INCLUDE_JVMTI
--- a/hotspot/src/share/vm/interpreter/templateTable.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/interpreter/templateTable.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -26,8 +26,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interp_masm.hpp"
 #include "interpreter/templateTable.hpp"
-#include "runtime/timer.hpp"
-
+#include "runtime/logTimer.hpp"
 
 #ifdef CC_INTERP
 
@@ -246,7 +245,7 @@
   if (_is_initialized) return;
 
   // Initialize table
-  TraceTime timer("TemplateTable initialization", TraceStartupTime);
+  TraceStartupTime timer("TemplateTable initialization");
 
   _bs = Universe::heap()->barrier_set();
 
--- a/hotspot/src/share/vm/logging/logConfiguration.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/logging/logConfiguration.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -82,8 +82,7 @@
 
 void LogConfiguration::initialize(jlong vm_start_time) {
   LogFileOutput::set_file_name_parameters(vm_start_time);
-  LogDecorations::set_vm_start_time_millis(vm_start_time);
-
+  LogDecorations::initialize(vm_start_time);
   assert(_outputs == NULL, "Should not initialize _outputs before this function, initialize called twice?");
   _outputs = NEW_C_HEAP_ARRAY(LogOutput*, 2, mtLogging);
   _outputs[0] = LogOutput::Stdout;
--- a/hotspot/src/share/vm/logging/logDecorations.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/logging/logDecorations.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,12 +29,21 @@
 #include "services/management.hpp"
 
 jlong LogDecorations::_vm_start_time_millis = 0;
+const char* LogDecorations::_host_name = "";
 
 LogDecorations::LogDecorations(LogLevelType level, const LogTagSet &tagset, const LogDecorators &decorators)
   : _level(level), _tagset(tagset), _millis(-1) {
   create_decorations(decorators);
 }
 
+void LogDecorations::initialize(jlong vm_start_time) {
+  char buffer[1024];
+  if (os::get_host_name(buffer, sizeof(buffer))){
+    _host_name = os::strdup_check_oom(buffer);
+  }
+  _vm_start_time_millis = vm_start_time;
+}
+
 void LogDecorations::create_decorations(const LogDecorators &decorators) {
   char* position = _decorations_buffer;
   #define DECORATOR(full_name, abbr) \
@@ -109,3 +118,9 @@
   int written = _tagset.label(pos, DecorationsBufferSize - (pos - _decorations_buffer));
   ASSERT_AND_RETURN(written, pos)
 }
+
+char* LogDecorations::create_hostname_decoration(char* pos) {
+  int written = jio_snprintf(pos, DecorationsBufferSize - (pos - _decorations_buffer), "%s", _host_name);
+  ASSERT_AND_RETURN(written, pos)
+}
+
--- a/hotspot/src/share/vm/logging/logDecorations.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/logging/logDecorations.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@
   LogTagSet _tagset;
   jlong _millis;
   static jlong _vm_start_time_millis;
+  static const char* _host_name;
 
   jlong java_millis();
   void create_decorations(const LogDecorators& decorators);
@@ -48,15 +49,13 @@
 #undef DECORATOR
 
  public:
+  static void initialize(jlong vm_start_time);
+
   LogDecorations(LogLevelType level, const LogTagSet& tagset, const LogDecorators& decorators);
 
   const char* decoration(LogDecorators::Decorator decorator) const {
     return _decoration_offset[decorator];
   }
-
-  static void set_vm_start_time_millis(jlong start_time) {
-    _vm_start_time_millis = start_time;
-  }
 };
 
 #endif // SHARE_VM_LOGGING_LOGDECORATIONS_HPP
--- a/hotspot/src/share/vm/logging/logDecorators.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/logging/logDecorators.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
 // uptimemillis - Milliseconds since the JVM started
 // timenanos    - The same value as generated by System.nanoTime()
 // uptimenanos  - Nanoseconds since the JVM started
+// hostname     - The hostname
 // pid          - The process identifier
 // tid          - The thread identifier
 // level        - The level associated with the log message
@@ -45,6 +46,7 @@
   DECORATOR(uptimemillis, um)   \
   DECORATOR(timenanos,    tn)   \
   DECORATOR(uptimenanos,  un)   \
+  DECORATOR(hostname,     hn)   \
   DECORATOR(pid,          p)    \
   DECORATOR(tid,          ti)   \
   DECORATOR(level,        l)    \
--- a/hotspot/src/share/vm/logging/logTag.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/logging/logTag.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
   LOG_TAG(alloc) \
   LOG_TAG(age) \
   LOG_TAG(barrier) \
+  LOG_TAG(biasedlocking) \
   LOG_TAG(bot) \
   LOG_TAG(census) \
   LOG_TAG(classhisto) \
@@ -73,6 +74,7 @@
   LOG_TAG(scavenge) \
   LOG_TAG(scrub) \
   LOG_TAG(start) \
+  LOG_TAG(startuptime) \
   LOG_TAG(state) \
   LOG_TAG(stats) \
   LOG_TAG(stringdedup) \
--- a/hotspot/src/share/vm/memory/metaspace.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/memory/metaspace.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -791,7 +791,6 @@
 void VirtualSpaceNode::inc_container_count() {
   assert_lock_strong(SpaceManager::expand_lock());
   _container_count++;
-  DEBUG_ONLY(verify_container_count();)
 }
 
 void VirtualSpaceNode::dec_container_count() {
@@ -1073,6 +1072,7 @@
   VirtualSpaceNode* next_vsl = prev_vsl;
   while (next_vsl != NULL) {
     VirtualSpaceNode* vsl = next_vsl;
+    DEBUG_ONLY(vsl->verify_container_count();)
     next_vsl = vsl->next();
     // Don't free the current virtual space since it will likely
     // be needed soon.
@@ -1137,19 +1137,19 @@
 }
 
 void VirtualSpaceNode::retire(ChunkManager* chunk_manager) {
+  DEBUG_ONLY(verify_container_count();)
   for (int i = (int)MediumIndex; i >= (int)ZeroIndex; --i) {
     ChunkIndex index = (ChunkIndex)i;
     size_t chunk_size = chunk_manager->free_chunks(index)->size();
 
     while (free_words_in_vs() >= chunk_size) {
-      DEBUG_ONLY(verify_container_count();)
       Metachunk* chunk = get_chunk_vs(chunk_size);
       assert(chunk != NULL, "allocation should have been successful");
 
       chunk_manager->return_chunks(index, chunk);
       chunk_manager->inc_free_chunks_total(chunk_size);
-      DEBUG_ONLY(verify_container_count();)
     }
+    DEBUG_ONLY(verify_container_count();)
   }
   assert(free_words_in_vs() == 0, "should be empty now");
 }
--- a/hotspot/src/share/vm/memory/metaspaceShared.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -40,6 +40,7 @@
 #include "memory/metaspaceShared.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/logTimer.hpp"
 #include "runtime/os.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/vmThread.hpp"
@@ -771,88 +772,89 @@
 // Preload classes from a list, populate the shared spaces and dump to a
 // file.
 void MetaspaceShared::preload_and_dump(TRAPS) {
-  TraceTime timer("Dump Shared Spaces", TraceStartupTime);
-  ResourceMark rm;
-  char class_list_path_str[JVM_MAXPATHLEN];
+  { TraceStartupTime timer("Dump Shared Spaces");
+    ResourceMark rm;
+    char class_list_path_str[JVM_MAXPATHLEN];
 
-  tty->print_cr("Allocated shared space: " SIZE_FORMAT " bytes at " PTR_FORMAT,
-                MetaspaceShared::shared_rs()->size(),
-                p2i(MetaspaceShared::shared_rs()->base()));
+    tty->print_cr("Allocated shared space: " SIZE_FORMAT " bytes at " PTR_FORMAT,
+                  MetaspaceShared::shared_rs()->size(),
+                  p2i(MetaspaceShared::shared_rs()->base()));
 
-  // Preload classes to be shared.
-  // Should use some os:: method rather than fopen() here. aB.
-  const char* class_list_path;
-  if (SharedClassListFile == NULL) {
-    // Construct the path to the class list (in jre/lib)
-    // Walk up two directories from the location of the VM and
-    // optionally tack on "lib" (depending on platform)
-    os::jvm_path(class_list_path_str, sizeof(class_list_path_str));
-    for (int i = 0; i < 3; i++) {
-      char *end = strrchr(class_list_path_str, *os::file_separator());
-      if (end != NULL) *end = '\0';
-    }
-    int class_list_path_len = (int)strlen(class_list_path_str);
-    if (class_list_path_len >= 3) {
-      if (strcmp(class_list_path_str + class_list_path_len - 3, "lib") != 0) {
-        if (class_list_path_len < JVM_MAXPATHLEN - 4) {
-          jio_snprintf(class_list_path_str + class_list_path_len,
-                       sizeof(class_list_path_str) - class_list_path_len,
-                       "%slib", os::file_separator());
-          class_list_path_len += 4;
+    // Preload classes to be shared.
+    // Should use some os:: method rather than fopen() here. aB.
+    const char* class_list_path;
+    if (SharedClassListFile == NULL) {
+      // Construct the path to the class list (in jre/lib)
+      // Walk up two directories from the location of the VM and
+      // optionally tack on "lib" (depending on platform)
+      os::jvm_path(class_list_path_str, sizeof(class_list_path_str));
+      for (int i = 0; i < 3; i++) {
+        char *end = strrchr(class_list_path_str, *os::file_separator());
+        if (end != NULL) *end = '\0';
+      }
+      int class_list_path_len = (int)strlen(class_list_path_str);
+      if (class_list_path_len >= 3) {
+        if (strcmp(class_list_path_str + class_list_path_len - 3, "lib") != 0) {
+          if (class_list_path_len < JVM_MAXPATHLEN - 4) {
+            jio_snprintf(class_list_path_str + class_list_path_len,
+                         sizeof(class_list_path_str) - class_list_path_len,
+                         "%slib", os::file_separator());
+            class_list_path_len += 4;
+          }
         }
       }
+      if (class_list_path_len < JVM_MAXPATHLEN - 10) {
+        jio_snprintf(class_list_path_str + class_list_path_len,
+                     sizeof(class_list_path_str) - class_list_path_len,
+                     "%sclasslist", os::file_separator());
+      }
+      class_list_path = class_list_path_str;
+    } else {
+      class_list_path = SharedClassListFile;
     }
-    if (class_list_path_len < JVM_MAXPATHLEN - 10) {
-      jio_snprintf(class_list_path_str + class_list_path_len,
-                   sizeof(class_list_path_str) - class_list_path_len,
-                   "%sclasslist", os::file_separator());
-    }
-    class_list_path = class_list_path_str;
-  } else {
-    class_list_path = SharedClassListFile;
-  }
+
+    int class_count = 0;
+    GrowableArray<Klass*>* class_promote_order = new GrowableArray<Klass*>();
 
-  int class_count = 0;
-  GrowableArray<Klass*>* class_promote_order = new GrowableArray<Klass*>();
+    // sun.io.Converters
+    static const char obj_array_sig[] = "[[Ljava/lang/Object;";
+    SymbolTable::new_permanent_symbol(obj_array_sig, THREAD);
 
-  // sun.io.Converters
-  static const char obj_array_sig[] = "[[Ljava/lang/Object;";
-  SymbolTable::new_permanent_symbol(obj_array_sig, THREAD);
+    // java.util.HashMap
+    static const char map_entry_array_sig[] = "[Ljava/util/Map$Entry;";
+    SymbolTable::new_permanent_symbol(map_entry_array_sig, THREAD);
 
-  // java.util.HashMap
-  static const char map_entry_array_sig[] = "[Ljava/util/Map$Entry;";
-  SymbolTable::new_permanent_symbol(map_entry_array_sig, THREAD);
+    // Need to allocate the op here:
+    // op.misc_data_space_alloc() will be called during preload_and_dump().
+    ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
+    VM_PopulateDumpSharedSpace op(loader_data, class_promote_order);
 
-  // Need to allocate the op here:
-  // op.misc_data_space_alloc() will be called during preload_and_dump().
-  ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
-  VM_PopulateDumpSharedSpace op(loader_data, class_promote_order);
-
-  tty->print_cr("Loading classes to share ...");
-  _has_error_classes = false;
-  class_count += preload_and_dump(class_list_path, class_promote_order,
-                                  THREAD);
-  if (ExtraSharedClassListFile) {
-    class_count += preload_and_dump(ExtraSharedClassListFile, class_promote_order,
+    tty->print_cr("Loading classes to share ...");
+    _has_error_classes = false;
+    class_count += preload_and_dump(class_list_path, class_promote_order,
                                     THREAD);
-  }
-  tty->print_cr("Loading classes to share: done.");
+    if (ExtraSharedClassListFile) {
+      class_count += preload_and_dump(ExtraSharedClassListFile, class_promote_order,
+                                      THREAD);
+    }
+    tty->print_cr("Loading classes to share: done.");
 
-  if (PrintSharedSpaces) {
-    tty->print_cr("Shared spaces: preloaded %d classes", class_count);
-  }
+    if (PrintSharedSpaces) {
+      tty->print_cr("Shared spaces: preloaded %d classes", class_count);
+    }
 
-  // Rewrite and link classes
-  tty->print_cr("Rewriting and linking classes ...");
+    // Rewrite and link classes
+    tty->print_cr("Rewriting and linking classes ...");
 
-  // Link any classes which got missed. This would happen if we have loaded classes that
-  // were not explicitly specified in the classlist. E.g., if an interface implemented by class K
-  // fails verification, all other interfaces that were not specified in the classlist but
-  // are implemented by K are not verified.
-  link_and_cleanup_shared_classes(CATCH);
-  tty->print_cr("Rewriting and linking classes: done");
+    // Link any classes which got missed. This would happen if we have loaded classes that
+    // were not explicitly specified in the classlist. E.g., if an interface implemented by class K
+    // fails verification, all other interfaces that were not specified in the classlist but
+    // are implemented by K are not verified.
+    link_and_cleanup_shared_classes(CATCH);
+    tty->print_cr("Rewriting and linking classes: done");
 
-  VMThread::execute(&op);
+    VMThread::execute(&op);
+  }
   // Since various initialization steps have been undone by this process,
   // it is not reasonable to continue running a java process.
   exit(0);
--- a/hotspot/src/share/vm/memory/universe.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/memory/universe.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -64,6 +64,7 @@
 #include "runtime/init.hpp"
 #include "runtime/java.hpp"
 #include "runtime/javaCalls.hpp"
+#include "runtime/logTimer.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/synchronizer.hpp"
 #include "runtime/thread.inline.hpp"
@@ -626,7 +627,9 @@
   guarantee(sizeof(oop) >= sizeof(HeapWord), "HeapWord larger than oop?");
   guarantee(sizeof(oop) % sizeof(HeapWord) == 0,
             "oop size is not not a multiple of HeapWord size");
-  TraceTime timer("Genesis", TraceStartupTime);
+
+  TraceStartupTime timer("Genesis");
+
   JavaClasses::compute_hard_coded_offsets();
 
   jint status = Universe::initialize_heap();
--- a/hotspot/src/share/vm/prims/jni.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/prims/jni.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -930,13 +930,7 @@
                              _arguments->push_oop(Handle((oop *)l, false)); }
 
   inline void set_ap(va_list rap) {
-#ifdef va_copy
     va_copy(_ap, rap);
-#elif defined (__va_copy)
-    __va_copy(_ap, rap);
-#else
-    _ap = rap;
-#endif
   }
 
  public:
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -2200,6 +2200,16 @@
 }
 
 jint JvmtiExport::load_agent_library(AttachOperation* op, outputStream* st) {
+  // get agent name and options
+  const char* agent = op->arg(0);
+  const char* absParam = op->arg(1);
+  const char* options = op->arg(2);
+
+  return load_agent_library(agent, absParam, options, st);
+}
+
+jint JvmtiExport::load_agent_library(const char *agent, const char *absParam,
+                                     const char *options, outputStream* st) {
   char ebuf[1024];
   char buffer[JVM_MAXPATHLEN];
   void* library = NULL;
@@ -2207,11 +2217,6 @@
   const char *on_attach_symbols[] = AGENT_ONATTACH_SYMBOLS;
   size_t num_symbol_entries = ARRAY_SIZE(on_attach_symbols);
 
-  // get agent name and options
-  const char* agent = op->arg(0);
-  const char* absParam = op->arg(1);
-  const char* options = op->arg(2);
-
   // The abs paramter should be "true" or "false"
   bool is_absolute_path = (absParam != NULL) && (strcmp(absParam,"true")==0);
 
--- a/hotspot/src/share/vm/prims/jvmtiExport.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/prims/jvmtiExport.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -372,6 +372,7 @@
   static void transition_pending_onload_raw_monitors() NOT_JVMTI_RETURN;
 
   // attach support
+  static jint load_agent_library(const char *agent, const char *absParam, const char *options, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR);
   static jint load_agent_library(AttachOperation* op, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR);
 
   // SetNativeMethodPrefix support
--- a/hotspot/src/share/vm/prims/methodHandles.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,7 @@
 #include "prims/jvmtiRedefineClassesTrace.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/javaCalls.hpp"
+#include "runtime/logTimer.hpp"
 #include "runtime/reflection.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/stubRoutines.hpp"
@@ -72,7 +73,7 @@
   assert(_adapter_code == NULL, "generate only once");
 
   ResourceMark rm;
-  TraceTime timer("MethodHandles adapters generation", TraceStartupTime);
+  TraceStartupTime timer("MethodHandles adapters generation");
   _adapter_code = MethodHandlesAdapterBlob::create(adapter_code_size);
   CodeBuffer code(_adapter_code);
   MethodHandlesAdapterGenerator g(&code);
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -409,6 +409,7 @@
   { "TraceClassResolution",      LogLevel::Info,  true,  LogTag::_classresolve },
   { "TraceExceptions",           LogLevel::Info,  true,  LogTag::_exceptions },
   { "TraceMonitorInflation",     LogLevel::Debug, true,  LogTag::_monitorinflation },
+  { "TraceBiasedLocking",        LogLevel::Info,  true,  LogTag::_biasedlocking },
   { NULL,                        LogLevel::Off,   false, LogTag::__NO_TAG }
 };
 
--- a/hotspot/src/share/vm/runtime/biasedLocking.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/biasedLocking.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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,6 +23,8 @@
  */
 
 #include "precompiled.hpp"
+#include "logging/log.hpp"
+#include "memory/resourceArea.hpp"
 #include "oops/klass.inline.hpp"
 #include "oops/markOop.hpp"
 #include "oops/oop.inline.hpp"
@@ -60,9 +62,7 @@
     // Indicate that future instances should enable it as well
     _biased_locking_enabled = true;
 
-    if (TraceBiasedLocking) {
-      tty->print_cr("Biased locking enabled");
-    }
+    log_info(biasedlocking)("Biased locking enabled");
   }
 
   bool allow_nested_vm_operations() const        { return false; }
@@ -144,14 +144,14 @@
   return info;
 }
 
-
 static BiasedLocking::Condition revoke_bias(oop obj, bool allow_rebias, bool is_bulk, JavaThread* requesting_thread) {
   markOop mark = obj->mark();
   if (!mark->has_bias_pattern()) {
-    if (TraceBiasedLocking) {
+    if (log_is_enabled(Info, biasedlocking)) {
       ResourceMark rm;
-      tty->print_cr("  (Skipping revocation of object of type %s because it's no longer biased)",
-                    obj->klass()->external_name());
+      log_info(biasedlocking)("  (Skipping revocation of object of type %s "
+                              "because it's no longer biased)",
+                              obj->klass()->external_name());
     }
     return BiasedLocking::NOT_BIASED;
   }
@@ -160,10 +160,29 @@
   markOop   biased_prototype = markOopDesc::biased_locking_prototype()->set_age(age);
   markOop unbiased_prototype = markOopDesc::prototype()->set_age(age);
 
-  if (TraceBiasedLocking && (Verbose || !is_bulk)) {
+  // Log at "info" level if not bulk, else "trace" level
+  if (!is_bulk) {
     ResourceMark rm;
-    tty->print_cr("Revoking bias of object " INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s , prototype header " INTPTR_FORMAT " , allow rebias %d , requesting thread " INTPTR_FORMAT,
-                  p2i((void *)obj), (intptr_t) mark, obj->klass()->external_name(), (intptr_t) obj->klass()->prototype_header(), (allow_rebias ? 1 : 0), (intptr_t) requesting_thread);
+    log_info(biasedlocking)("Revoking bias of object " INTPTR_FORMAT " , mark "
+                            INTPTR_FORMAT " , type %s , prototype header " INTPTR_FORMAT
+                            " , allow rebias %d , requesting thread " INTPTR_FORMAT,
+                            p2i((void *)obj),
+                            (intptr_t) mark,
+                            obj->klass()->external_name(),
+                            (intptr_t) obj->klass()->prototype_header(),
+                            (allow_rebias ? 1 : 0),
+                            (intptr_t) requesting_thread);
+  } else {
+    ResourceMark rm;
+    log_trace(biasedlocking)("Revoking bias of object " INTPTR_FORMAT " , mark "
+                             INTPTR_FORMAT " , type %s , prototype header " INTPTR_FORMAT
+                             " , allow rebias %d , requesting thread " INTPTR_FORMAT,
+                             p2i((void *)obj),
+                             (intptr_t) mark,
+                             obj->klass()->external_name(),
+                             (intptr_t) obj->klass()->prototype_header(),
+                             (allow_rebias ? 1 : 0),
+                             (intptr_t) requesting_thread);
   }
 
   JavaThread* biased_thread = mark->biased_locker();
@@ -174,8 +193,11 @@
     if (!allow_rebias) {
       obj->set_mark(unbiased_prototype);
     }
-    if (TraceBiasedLocking && (Verbose || !is_bulk)) {
-      tty->print_cr("  Revoked bias of anonymously-biased object");
+    // Log at "info" level if not bulk, else "trace" level
+    if (!is_bulk) {
+      log_info(biasedlocking)("  Revoked bias of anonymously-biased object");
+    } else {
+      log_trace(biasedlocking)("  Revoked bias of anonymously-biased object");
     }
     return BiasedLocking::BIAS_REVOKED;
   }
@@ -198,8 +220,11 @@
     } else {
       obj->set_mark(unbiased_prototype);
     }
-    if (TraceBiasedLocking && (Verbose || !is_bulk)) {
-      tty->print_cr("  Revoked bias of object biased toward dead thread");
+    // Log at "info" level if not bulk, else "trace" level
+    if (!is_bulk) {
+      log_info(biasedlocking)("  Revoked bias of object biased toward dead thread");
+    } else {
+      log_trace(biasedlocking)("  Revoked bias of object biased toward dead thread");
     }
     return BiasedLocking::BIAS_REVOKED;
   }
@@ -214,21 +239,17 @@
   for (int i = 0; i < cached_monitor_info->length(); i++) {
     MonitorInfo* mon_info = cached_monitor_info->at(i);
     if (mon_info->owner() == obj) {
-      if (TraceBiasedLocking && Verbose) {
-        tty->print_cr("   mon_info->owner (" PTR_FORMAT ") == obj (" PTR_FORMAT ")",
-                      p2i((void *) mon_info->owner()),
-                      p2i((void *) obj));
-      }
+      log_trace(biasedlocking)("   mon_info->owner (" PTR_FORMAT ") == obj (" PTR_FORMAT ")",
+                               p2i((void *) mon_info->owner()),
+                               p2i((void *) obj));
       // Assume recursive case and fix up highest lock later
       markOop mark = markOopDesc::encode((BasicLock*) NULL);
       highest_lock = mon_info->lock();
       highest_lock->set_displaced_header(mark);
     } else {
-      if (TraceBiasedLocking && Verbose) {
-        tty->print_cr("   mon_info->owner (" PTR_FORMAT ") != obj (" PTR_FORMAT ")",
-                      p2i((void *) mon_info->owner()),
-                      p2i((void *) obj));
-      }
+      log_trace(biasedlocking)("   mon_info->owner (" PTR_FORMAT ") != obj (" PTR_FORMAT ")",
+                               p2i((void *) mon_info->owner()),
+                               p2i((void *) obj));
     }
   }
   if (highest_lock != NULL) {
@@ -240,12 +261,18 @@
     // ordering (e.g. ppc).
     obj->release_set_mark(markOopDesc::encode(highest_lock));
     assert(!obj->mark()->has_bias_pattern(), "illegal mark state: stack lock used bias bit");
-    if (TraceBiasedLocking && (Verbose || !is_bulk)) {
-      tty->print_cr("  Revoked bias of currently-locked object");
+    // Log at "info" level if not bulk, else "trace" level
+    if (!is_bulk) {
+      log_info(biasedlocking)("  Revoked bias of currently-locked object");
+    } else {
+      log_trace(biasedlocking)("  Revoked bias of currently-locked object");
     }
   } else {
-    if (TraceBiasedLocking && (Verbose || !is_bulk)) {
-      tty->print_cr("  Revoked bias of currently-unlocked object");
+    // Log at "info" level if not bulk, else "trace" level
+    if (!is_bulk) {
+      log_info(biasedlocking)("  Revoked bias of currently-unlocked object");
+    } else {
+      log_trace(biasedlocking)("  Revoked bias of currently-unlocked object");
     }
     if (allow_rebias) {
       obj->set_mark(biased_prototype);
@@ -326,12 +353,12 @@
                                                                    JavaThread* requesting_thread) {
   assert(SafepointSynchronize::is_at_safepoint(), "must be done at safepoint");
 
-  if (TraceBiasedLocking) {
-    tty->print_cr("* Beginning bulk revocation (kind == %s) because of object "
-                  INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s",
-                  (bulk_rebias ? "rebias" : "revoke"),
-                  p2i((void *) o), (intptr_t) o->mark(), o->klass()->external_name());
-  }
+  log_info(biasedlocking)("* Beginning bulk revocation (kind == %s) because of object "
+                          INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s",
+                          (bulk_rebias ? "rebias" : "revoke"),
+                          p2i((void *) o),
+                          (intptr_t) o->mark(),
+                          o->klass()->external_name());
 
   jlong cur_time = os::javaTimeMillis();
   o->klass()->set_last_biased_lock_bulk_revocation_time(cur_time);
@@ -377,9 +404,9 @@
     // adjust the header of the given object to revoke its bias.
     revoke_bias(o, attempt_rebias_of_object && klass->prototype_header()->has_bias_pattern(), true, requesting_thread);
   } else {
-    if (TraceBiasedLocking) {
+    if (log_is_enabled(Info, biasedlocking)) {
       ResourceMark rm;
-      tty->print_cr("* Disabling biased locking for type %s", klass->external_name());
+      log_info(biasedlocking)("* Disabling biased locking for type %s", klass->external_name());
     }
 
     // Disable biased locking for this data type. Not only will this
@@ -407,9 +434,7 @@
     revoke_bias(o, false, true, requesting_thread);
   }
 
-  if (TraceBiasedLocking) {
-    tty->print_cr("* Ending bulk revocation");
-  }
+  log_info(biasedlocking)("* Ending bulk revocation");
 
   BiasedLocking::Condition status_code = BiasedLocking::BIAS_REVOKED;
 
@@ -420,9 +445,7 @@
                                            klass->prototype_header()->bias_epoch());
     o->set_mark(new_mark);
     status_code = BiasedLocking::BIAS_REVOKED_AND_REBIASED;
-    if (TraceBiasedLocking) {
-      tty->print_cr("  Rebiased object toward thread " INTPTR_FORMAT, (intptr_t) requesting_thread);
-    }
+    log_info(biasedlocking)("  Rebiased object toward thread " INTPTR_FORMAT, (intptr_t) requesting_thread);
   }
 
   assert(!o->mark()->has_bias_pattern() ||
@@ -485,16 +508,12 @@
 
   virtual void doit() {
     if (_obj != NULL) {
-      if (TraceBiasedLocking) {
-        tty->print_cr("Revoking bias with potentially per-thread safepoint:");
-      }
+      log_info(biasedlocking)("Revoking bias with potentially per-thread safepoint:");
       _status_code = revoke_bias((*_obj)(), false, false, _requesting_thread);
       clean_up_cached_monitor_info();
       return;
     } else {
-      if (TraceBiasedLocking) {
-        tty->print_cr("Revoking bias with global safepoint:");
-      }
+      log_info(biasedlocking)("Revoking bias with global safepoint:");
       BiasedLocking::revoke_at_safepoint(_objs);
     }
   }
@@ -608,9 +627,7 @@
       // can come in with a CAS to steal the bias of an object that has a
       // stale epoch.
       ResourceMark rm;
-      if (TraceBiasedLocking) {
-        tty->print_cr("Revoking bias by walking my own stack:");
-      }
+      log_info(biasedlocking)("Revoking bias by walking my own stack:");
       BiasedLocking::Condition cond = revoke_bias(obj(), false, false, (JavaThread*) THREAD);
       ((JavaThread*) THREAD)->set_cached_monitor_info(NULL);
       assert(cond == BIAS_REVOKED, "why not?");
--- a/hotspot/src/share/vm/runtime/globals.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/globals.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -403,25 +403,20 @@
     st->cr();
 
   } else if (!is_bool() && !is_ccstr()) {
-
-    if (printRanges) {
-
-      st->print("%9s %-50s ", _type, _name);
+    st->print("%9s %-50s ", _type, _name);
 
-      CommandLineFlagRangeList::print(_name, st, true);
+    CommandLineFlagRangeList::print(_name, st, true);
 
-      st->print(" %-20s", " ");
-      print_kind(st);
+    st->print(" %-20s", " ");
+    print_kind(st);
 
 #ifndef PRODUCT
-      if (withComments) {
-        st->print("%s", _doc);
-      }
+    if (withComments) {
+      st->print("%s", _doc);
+    }
 #endif
 
-      st->cr();
-
-    }
+    st->cr();
   }
 }
 
@@ -1255,8 +1250,6 @@
 
 #endif // PRODUCT
 
-#define ONLY_PRINT_PRODUCT_FLAGS
-
 void CommandLineFlags::printFlags(outputStream* out, bool withComments, bool printRanges) {
   // Print the flags sorted by name
   // note: this method is called before the thread structure is in place
@@ -1281,9 +1274,6 @@
 
   for (size_t i = 0; i < length; i++) {
     if (array[i]->is_unlocked()) {
-#ifdef ONLY_PRINT_PRODUCT_FLAGS
-      if (!array[i]->is_notproduct() && !array[i]->is_develop())
-#endif // ONLY_PRINT_PRODUCT_FLAGS
       array[i]->print_on(out, withComments, printRanges);
     }
   }
--- a/hotspot/src/share/vm/runtime/globals.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -1482,18 +1482,12 @@
   develop(bool, TraceCompiledIC, false,                                     \
           "Trace changes of compiled IC")                                   \
                                                                             \
-  develop(bool, TraceStartupTime, false,                                    \
-          "Trace setup time")                                               \
-                                                                            \
   develop(bool, TraceProtectionDomainVerification, false,                   \
           "Trace protection domain verification")                           \
                                                                             \
   develop(bool, TraceClearedExceptions, false,                              \
           "Print when an exception is forcibly cleared")                    \
                                                                             \
-  product(bool, TraceBiasedLocking, false,                                  \
-          "Trace biased locking in JVM")                                    \
-                                                                            \
   /* gc */                                                                  \
                                                                             \
   product(bool, UseSerialGC, false,                                         \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/runtime/logTimer.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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.
+ *
+ */
+
+#ifndef SHARE_VM_RUNTIME_LOG_TIMER_HPP
+#define SHARE_VM_RUNTIME_LOG_TIMER_HPP
+
+#include "logging/log.hpp"
+#include "runtime/timer.hpp"
+
+// TraceStartupTime is used for tracing the execution time of a block with logging
+// Usage:
+//  { TraceStartupTime t("block time")
+//    some_code();
+//  }
+//
+
+class TraceStartupTime : public TraceTime {
+  public:
+    TraceStartupTime(const char* s) : TraceTime(s, log_is_enabled(Info, startuptime), LogTag::_startuptime) {}
+};
+
+#endif // SHARE_VM_RUNTIME_LOG_TIMER_HPP
--- a/hotspot/src/share/vm/runtime/os.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/os.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -152,7 +152,6 @@
   static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned);
 
   // Get summary strings for system information in buffer provided
-  static bool  get_host_name(char* buf, size_t buflen) PRODUCT_RETURN_(return false;);  // true if available
   static void  get_summary_cpu_info(char* buf, size_t buflen);
   static void  get_summary_os_info(char* buf, size_t buflen);
 
@@ -595,6 +594,9 @@
   // Write to stream
   static int log_vsnprintf(char* buf, size_t len, const char* fmt, va_list args) ATTRIBUTE_PRINTF(3, 0);
 
+  // Get host name in buffer provided
+  static bool get_host_name(char* buf, size_t buflen);
+
   // Print out system information; they are called by fatal error handler.
   // Output format may be different on different platforms.
   static void print_os_info(outputStream* st);
--- a/hotspot/src/share/vm/runtime/stubRoutines.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/stubRoutines.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -28,9 +28,9 @@
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
+#include "runtime/logTimer.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
-#include "runtime/timer.hpp"
 #include "utilities/copy.hpp"
 #ifdef COMPILER2
 #include "opto/runtime.hpp"
@@ -183,7 +183,7 @@
 void StubRoutines::initialize1() {
   if (_code1 == NULL) {
     ResourceMark rm;
-    TraceTime timer("StubRoutines generation 1", TraceStartupTime);
+    TraceStartupTime timer("StubRoutines generation 1");
     _code1 = BufferBlob::create("StubRoutines (1)", code_size1);
     if (_code1 == NULL) {
       vm_exit_out_of_memory(code_size1, OOM_MALLOC_ERROR, "CodeCache: no room for StubRoutines (1)");
@@ -276,7 +276,7 @@
 void StubRoutines::initialize2() {
   if (_code2 == NULL) {
     ResourceMark rm;
-    TraceTime timer("StubRoutines generation 2", TraceStartupTime);
+    TraceStartupTime timer("StubRoutines generation 2");
     _code2 = BufferBlob::create("StubRoutines (2)", code_size2);
     if (_code2 == NULL) {
       vm_exit_out_of_memory(code_size2, OOM_MALLOC_ERROR, "CodeCache: no room for StubRoutines (2)");
--- a/hotspot/src/share/vm/runtime/thread.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -67,6 +67,7 @@
 #include "runtime/java.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/jniPeriodicChecker.hpp"
+#include "runtime/logTimer.hpp"
 #include "runtime/memprofiler.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/objectMonitor.hpp"
@@ -169,11 +170,10 @@
     assert(((uintptr_t) aligned_addr + (uintptr_t) size) <=
            ((uintptr_t) real_malloc_addr + (uintptr_t) aligned_size),
            "JavaThread alignment code overflowed allocated storage");
-    if (TraceBiasedLocking) {
-      if (aligned_addr != real_malloc_addr) {
-        tty->print_cr("Aligned thread " INTPTR_FORMAT " to " INTPTR_FORMAT,
-                      p2i(real_malloc_addr), p2i(aligned_addr));
-      }
+    if (aligned_addr != real_malloc_addr) {
+      log_info(biasedlocking)("Aligned thread " INTPTR_FORMAT " to " INTPTR_FORMAT,
+                              p2i(real_malloc_addr),
+                              p2i(aligned_addr));
     }
     ((Thread*) aligned_addr)->_real_malloc_address = real_malloc_addr;
     return aligned_addr;
@@ -1005,9 +1005,9 @@
 char java_runtime_name[128] = "";
 char java_runtime_version[128] = "";
 
-// extract the JRE name from sun.misc.Version.java_runtime_name
+// extract the JRE name from java.lang.VersionProps.java_runtime_name
 static const char* get_java_runtime_name(TRAPS) {
-  Klass* k = SystemDictionary::find(vmSymbols::sun_misc_Version(),
+  Klass* k = SystemDictionary::find(vmSymbols::java_lang_VersionProps(),
                                     Handle(), Handle(), CHECK_AND_CLEAR_NULL);
   fieldDescriptor fd;
   bool found = k != NULL &&
@@ -1027,9 +1027,9 @@
   }
 }
 
-// extract the JRE version from sun.misc.Version.java_runtime_version
+// extract the JRE version from java.lang.VersionProps.java_runtime_version
 static const char* get_java_runtime_version(TRAPS) {
-  Klass* k = SystemDictionary::find(vmSymbols::sun_misc_Version(),
+  Klass* k = SystemDictionary::find(vmSymbols::java_lang_VersionProps(),
                                     Handle(), Handle(), CHECK_AND_CLEAR_NULL);
   fieldDescriptor fd;
   bool found = k != NULL &&
@@ -3341,7 +3341,7 @@
 }
 
 void Threads::initialize_java_lang_classes(JavaThread* main_thread, TRAPS) {
-  TraceTime timer("Initialize java.lang classes", TraceStartupTime);
+  TraceStartupTime timer("Initialize java.lang classes");
 
   if (EagerXrunInit && Arguments::init_libraries_at_startup()) {
     create_vm_init_libraries();
@@ -3388,6 +3388,8 @@
 }
 
 void Threads::initialize_jsr292_core_classes(TRAPS) {
+  TraceStartupTime timer("Initialize java.lang.invoke classes");
+
   initialize_class(vmSymbols::java_lang_invoke_MethodHandle(), CHECK);
   initialize_class(vmSymbols::java_lang_invoke_MemberName(), CHECK);
   initialize_class(vmSymbols::java_lang_invoke_MethodHandleNatives(), CHECK);
@@ -3457,7 +3459,7 @@
   HOTSPOT_VM_INIT_BEGIN();
 
   // Timing (must come after argument parsing)
-  TraceTime timer("Create VM", TraceStartupTime);
+  TraceStartupTime timer("Create VM");
 
   // Initialize the os module after parsing the args
   jint os_init_2_result = os::init_2();
@@ -3542,8 +3544,9 @@
   JvmtiExport::transition_pending_onload_raw_monitors();
 
   // Create the VMThread
-  { TraceTime timer("Start VMThread", TraceStartupTime);
-    VMThread::create();
+  { TraceStartupTime timer("Start VMThread");
+
+  VMThread::create();
     Thread* vmthread = VMThread::vm_thread();
 
     if (!os::create_thread(vmthread, os::vm_thread)) {
--- a/hotspot/src/share/vm/runtime/timer.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/timer.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "logging/log.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/timer.hpp"
 #include "utilities/ostream.hpp"
@@ -114,14 +115,15 @@
 }
 
 TraceTime::TraceTime(const char* title,
-                     bool doit) {
+                     bool doit,
+                     LogTagType tag) {
   _active   = doit;
   _verbose  = true;
+  _tag      = tag;
+  _title    = title;
 
   if (_active) {
     _accum = NULL;
-    tty->print("[%s", title);
-    tty->flush();
     _t.start();
   }
 }
@@ -129,14 +131,14 @@
 TraceTime::TraceTime(const char* title,
                      elapsedTimer* accumulator,
                      bool doit,
-                     bool verbose) {
-  _active = doit;
-  _verbose = verbose;
+                     bool verbose,
+                     LogTagType tag) {
+  _active   = doit;
+  _verbose  = verbose;
+  _tag      = tag;
+  _title    = title;
+
   if (_active) {
-    if (_verbose) {
-      tty->print("[%s", title);
-      tty->flush();
-    }
     _accum = accumulator;
     _t.start();
   }
@@ -147,8 +149,15 @@
     _t.stop();
     if (_accum!=NULL) _accum->add(_t);
     if (_verbose) {
-      tty->print_cr(", %3.7f secs]", _t.seconds());
-      tty->flush();
+      switch (_tag) {
+        case LogTag::_startuptime :
+          log_info(startuptime)("%s, %3.7f secs", _title, _t.seconds());
+          break;
+        case LogTag::__NO_TAG :
+       default :
+          tty->print_cr("[%s, %3.7f secs]", _title, _t.seconds());
+          tty->flush();
+      }
     }
   }
 }
--- a/hotspot/src/share/vm/runtime/timer.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/runtime/timer.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -25,6 +25,7 @@
 #ifndef SHARE_VM_RUNTIME_TIMER_HPP
 #define SHARE_VM_RUNTIME_TIMER_HPP
 
+#include "logging/logTag.hpp"
 #include "utilities/globalDefinitions.hpp"
 
 // Timers for simple measurement.
@@ -85,14 +86,19 @@
   bool          _verbose;   // report every timing
   elapsedTimer  _t;         // timer
   elapsedTimer* _accum;     // accumulator
+  const char*   _title;     // name of timer
+  LogTagType    _tag;       // stream to print to
+
  public:
   // Constructors
   TraceTime(const char* title,
-            bool doit = true);
+            bool doit = true,
+            LogTagType tag = LogTag::__NO_TAG);
   TraceTime(const char* title,
             elapsedTimer* accumulator,
             bool doit = true,
-            bool verbose = false);
+            bool verbose = false,
+            LogTagType tag = LogTag::__NO_TAG);
   ~TraceTime();
 
   // Accessors
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp	Mon Mar 07 16:38:23 2016 -0800
@@ -71,6 +71,7 @@
 #endif // INCLUDE_SERVICES
 #if INCLUDE_JVMTI
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
+  DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
 #endif // INCLUDE_JVMTI
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
@@ -254,6 +255,66 @@
   }
 }
 
+JVMTIAgentLoadDCmd::JVMTIAgentLoadDCmd(outputStream* output, bool heap) :
+                                       DCmdWithParser(output, heap),
+  _libpath("library path", "Absolute path of the JVMTI agent to load.",
+           "STRING", true),
+  _option("agent option", "Option string to pass the agent.", "STRING", false) {
+  _dcmdparser.add_dcmd_argument(&_libpath);
+  _dcmdparser.add_dcmd_argument(&_option);
+}
+
+void JVMTIAgentLoadDCmd::execute(DCmdSource source, TRAPS) {
+
+  if (_libpath.value() == NULL) {
+    output()->print_cr("JVMTI.agent_load dcmd needs library path.");
+    return;
+  }
+
+  char *suffix = strrchr(_libpath.value(), '.');
+  bool is_java_agent = (suffix != NULL) && (strncmp(".jar", suffix, 4) == 0);
+
+  if (is_java_agent) {
+    if (_option.value() == NULL) {
+      JvmtiExport::load_agent_library("instrument", "false",
+                                      _libpath.value(), output());
+    } else {
+      size_t opt_len = strlen(_libpath.value()) + strlen(_option.value()) + 2;
+      if (opt_len > 4096) {
+        output()->print_cr("JVMTI agent attach failed: Options is too long.");
+        return;
+      }
+
+      char *opt = (char *)os::malloc(opt_len, mtInternal);
+      if (opt == NULL) {
+        output()->print_cr("JVMTI agent attach failed: "
+                           "Could not allocate %zu bytes for argument.",
+                           opt_len);
+        return;
+      }
+
+      jio_snprintf(opt, opt_len, "%s=%s", _libpath.value(), _option.value());
+      JvmtiExport::load_agent_library("instrument", "false", opt, output());
+
+      os::free(opt);
+    }
+  } else {
+    JvmtiExport::load_agent_library(_libpath.value(), "true",
+                                    _option.value(), output());
+  }
+}
+
+int JVMTIAgentLoadDCmd::num_arguments() {
+  ResourceMark rm;
+  JVMTIAgentLoadDCmd* dcmd = new JVMTIAgentLoadDCmd(NULL, false);
+  if (dcmd != NULL) {
+    DCmdMark mark(dcmd);
+    return dcmd->_dcmdparser.num_arguments();
+  } else {
+    return 0;
+  }
+}
+
 void PrintSystemPropertiesDCmd::execute(DCmdSource source, TRAPS) {
   // load sun.misc.VMSupport
   Symbol* klass = vmSymbols::sun_misc_VMSupport();
--- a/hotspot/src/share/vm/services/diagnosticCommand.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/services/diagnosticCommand.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -174,6 +174,26 @@
   virtual void execute(DCmdSource source, TRAPS);
 };
 
+class JVMTIAgentLoadDCmd : public DCmdWithParser {
+protected:
+  DCmdArgument<char*> _libpath;
+  DCmdArgument<char*> _option;
+public:
+  JVMTIAgentLoadDCmd(outputStream* output, bool heap);
+  static const char* name() { return "JVMTI.agent_load"; }
+  static const char* description() {
+    return "Load JVMTI native agent.";
+  }
+  static const char* impact() { return "Low"; }
+  static const JavaPermission permission() {
+    JavaPermission p = {"java.lang.management.ManagementPermission",
+                        "control", NULL};
+    return p;
+  }
+  static int num_arguments();
+  virtual void execute(DCmdSource source, TRAPS);
+};
+
 class VMDynamicLibrariesDCmd : public DCmd {
 public:
   VMDynamicLibrariesDCmd(outputStream* output, bool heap);
--- a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp	Mon Mar 07 16:38:23 2016 -0800
@@ -174,6 +174,8 @@
 #if _MSC_VER < 1800
 // Visual Studio 2013 introduced strtoull(); before, one has to use _strtoui64() instead.
 #define strtoull _strtoui64
+// Visual Studio prior to 2013 had no va_copy, but could safely copy va_list by assignement
+#define va_copy(dest, src) dest = src
 // Fixes some wrong warnings about 'this' : used in base member initializer list
 #pragma warning( disable : 4355 )
 #endif
--- a/hotspot/test/TEST.ROOT	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/TEST.ROOT	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -30,7 +30,7 @@
 keys=cte_test jcmd nmt regression gc stress
 
 groups=TEST.groups [closed/TEST.groups]
-requires.properties=sun.arch.data.model java.version
+requires.properties=sun.arch.data.model
 
 # Tests using jtreg 4.1 b12 features
 requiredVersion=4.1 b12
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,10 @@
 /*
  * @test
  * @library /test/lib /testlibrary /
+ * @modules java.base/jdk.internal.org.objectweb.asm
  * @build compiler.calls.common.InvokeDynamic
  * @build compiler.calls.common.InvokeDynamicPatcher
- * @run driver compiler.calls.common.InvokeDynamicPatcher
+ * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,10 @@
 /*
  * @test
  * @library /test/lib /testlibrary /
+ * @modules java.base/jdk.internal.org.objectweb.asm
  * @build compiler.calls.common.InvokeDynamic
  * @build compiler.calls.common.InvokeDynamicPatcher
- * @run driver compiler.calls.common.InvokeDynamicPatcher
+ * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,10 @@
 /*
  * @test
  * @library /test/lib /testlibrary /
+ * @modules java.base/jdk.internal.org.objectweb.asm
  * @build compiler.calls.common.InvokeDynamic
  * @build compiler.calls.common.InvokeDynamicPatcher
- * @run driver compiler.calls.common.InvokeDynamicPatcher
+ * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,10 @@
 /*
  * @test
  * @library /test/lib /testlibrary /
+ * @modules java.base/jdk.internal.org.objectweb.asm
  * @build compiler.calls.common.InvokeDynamic
  * @build compiler.calls.common.InvokeDynamicPatcher
- * @run driver compiler.calls.common.InvokeDynamicPatcher
+ * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,10 @@
 /*
  * @test
  * @library /test/lib /testlibrary /
+ * @modules java.base/jdk.internal.org.objectweb.asm
  * @build compiler.calls.common.InvokeDynamic
  * @build compiler.calls.common.InvokeDynamicPatcher
- * @run driver compiler.calls.common.InvokeDynamicPatcher
+ * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,10 @@
 /*
  * @test
  * @library /test/lib /testlibrary /
+ * @modules java.base/jdk.internal.org.objectweb.asm
  * @build compiler.calls.common.InvokeDynamic
  * @build compiler.calls.common.InvokeDynamicPatcher
- * @run driver compiler.calls.common.InvokeDynamicPatcher
+ * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
--- a/hotspot/test/compiler/codecache/jmx/PeakUsageTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/codecache/jmx/PeakUsageTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 
 /*
  * @test PeakUsageTest
+ * @ignore 8151345
  * @library /testlibrary /test/lib
  * @modules java.base/sun.misc
  *          java.management
--- a/hotspot/test/compiler/intrinsics/unsafe/TestUnsafeUnalignedMismatchedAccesses.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/intrinsics/unsafe/TestUnsafeUnalignedMismatchedAccesses.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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 @@
  * @test
  * @bug 8136473
  * @summary Mismatched stores on same slice possible with Unsafe.Put*Unaligned methods
+ * @modules java.base/jdk.internal.misc
  * @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation TestUnsafeUnalignedMismatchedAccesses
  * @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:+UnlockDiagnosticVMOptions -XX:-UseUnalignedAccesses TestUnsafeUnalignedMismatchedAccesses
  *
--- a/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
  * @bug 8136421
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
  * @library /testlibrary /
+ * @modules jdk.vm.ci/jdk.vm.ci.runtime
  * @run main/othervm -XX:+UnlockExperimentalVMOptions
  *      -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=true
  *      -XX:+EnableJVMCI
--- a/hotspot/test/compiler/jvmci/code/InterpreterFrameSizeTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/code/InterpreterFrameSizeTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -24,6 +24,14 @@
 /**
  * @test
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ *          jdk.vm.ci/jdk.vm.ci.common
+ *          jdk.vm.ci/jdk.vm.ci.amd64
+ *          jdk.vm.ci/jdk.vm.ci.sparc
  * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.code.InterpreterFrameSizeTest
  */
--- a/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
  * @bug 8136421
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
  * @library /testlibrary /
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.runtime
  * @run main/othervm -XX:+UnlockExperimentalVMOptions
  *      -Dcompiler.jvmci.compilerToVM.JVM_RegisterJVMCINatives.positive=true
  *      -XX:+EnableJVMCI
--- a/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java	Mon Mar 07 16:38:23 2016 -0800
@@ -24,7 +24,14 @@
 /**
  * @test
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          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/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java	Mon Mar 07 16:38:23 2016 -0800
@@ -24,6 +24,12 @@
 /**
  * @test
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ *          jdk.vm.ci/jdk.vm.ci.common
  * @compile CodeInstallerTest.java
  * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidDebugInfo
  */
--- a/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java	Mon Mar 07 16:38:23 2016 -0800
@@ -24,6 +24,12 @@
 /**
  * @test
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.code.site
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ *          jdk.vm.ci/jdk.vm.ci.common
  * @compile CodeInstallerTest.java
  * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidOopMap
  */
--- a/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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,10 @@
  * @bug 8136421
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
  * @library /testlibrary /
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.runtime
  * @build compiler.jvmci.common.JVMCIHelpers
  *        compiler.jvmci.events.JvmciShutdownEventListener
  *        compiler.jvmci.events.JvmciShutdownEventTest
@@ -36,10 +40,11 @@
  *     compiler.jvmci.common.JVMCIHelpers$EmptyHotspotCompiler
  *     compiler.jvmci.common.JVMCIHelpers$EmptyCompilerFactory
  *     compiler.jvmci.events.JvmciShutdownEventListener
- * @run driver
- *     compiler.jvmci.events.JvmciShutdownEventTest
+ * @run main/othervm compiler.jvmci.events.JvmciShutdownEventTest
  */
 
+ // as soon as CODETOOLS-7901589 fixed, '@run main/othervm' at L43 should be replaced w/ '@run driver'
+
 package compiler.jvmci.events;
 
 import jdk.test.lib.ExitCode;
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
 /**
  * @test
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @modules jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.runtime
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveConcreteMethodTest
  */
 
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
 /**
  * @test
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @modules jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.runtime
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveMethodTest
  */
 
--- a/hotspot/test/gc/g1/plab/TestPLABResize.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/gc/g1/plab/TestPLABResize.java	Mon Mar 07 16:38:23 2016 -0800
@@ -35,6 +35,7 @@
  *        gc.g1.plab.lib.MemoryConsumer
  *        gc.g1.plab.lib.PLABUtils
  *        gc.g1.plab.lib.AppPLABResize
+ * @ignore 8150183
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main gc.g1.plab.TestPLABResize
--- a/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 TestPrintGCDetailsVerbose
  * @bug 8016740
- * @summary Tests that jvm with PrintGCDetails and Verbose flags do not crash when ParOldGC has no memory
+ * @summary Tests that jvm with maximally verbose GC logging does not crash when ParOldGC has no memory
  * @key gc
- * @requires java.version ~= ".*fastdebug"
  * @requires vm.gc=="Parallel" | vm.gc=="null"
  * @library /testlibrary
- * @run main/othervm -Xmx50m -XX:+UseParallelOldGC -XX:+PrintGCDetails -XX:+Verbose TestPrintGCDetailsVerbose
+ * @run main/othervm -Xmx50m -XX:+UseParallelGC -Xlog:gc*=trace TestPrintGCDetailsVerbose
  */
 public class TestPrintGCDetailsVerbose {
 
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 @@
         int failedTests;
         List<JVMOption> allOptions;
 
-        allOptionsAsMap = JVMOptionsUtils.getOptionsWithRangeAsMap();
+        allOptionsAsMap = JVMOptionsUtils.getOptionsWithRangeAsMap(origin -> (!(origin.contains("develop") || origin.contains("notproduct"))));
 
         /* Shared flags can cause JVM to exit with error code 2 */
         setAllowedExitCodes("SharedReadWriteSize", 2);
@@ -84,6 +84,13 @@
         setAllowedExitCodes("SharedMiscCodeSize", 2);
 
         /*
+         * JDK-8145204
+         * Temporarily remove testing of max range for ParGCArrayScanChunk because
+         * JVM can hang when ParGCArrayScanChunk=4294967296 and ParallelGC is used
+         */
+        excludeTestMaxRange("ParGCArrayScanChunk");
+
+        /*
          * Remove CICompilerCount from testing because currently it can hang system
          */
         excludeTestMaxRange("CICompilerCount");
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,6 +37,7 @@
 import sun.tools.attach.HotSpotVirtualMachine;
 
 import static optionsvalidation.JVMOptionsUtils.failedMessage;
+import static optionsvalidation.JVMOptionsUtils.GCType;
 import static optionsvalidation.JVMOptionsUtils.printOutputContent;
 import static optionsvalidation.JVMOptionsUtils.VMType;
 
@@ -374,17 +375,21 @@
     private boolean runJavaWithParam(String optionValue, boolean valid) throws Exception {
         int exitCode;
         boolean result = true;
-        String value = optionValue.substring(optionValue.lastIndexOf("=") + 1);
-        String fullOptionString = prependString.toString() + optionValue;
+        String errorMessage = null;
         List<String> runJava = new ArrayList<>();
         OutputAnalyzer out;
 
         if (VMType != null) {
             runJava.add(VMType);
         }
+
+        if (GCType != null) {
+            runJava.add(GCType);
+        }
+
         runJava.addAll(prepend);
         runJava.add(optionValue);
-        runJava.add(JVMOptionsUtils.class.getName());
+        runJava.add(JVMStartup.class.getName());
 
         out = new OutputAnalyzer(ProcessTools.createJavaProcessBuilder(runJava.toArray(new String[0])).start());
 
@@ -392,40 +397,37 @@
 
         if (out.getOutput().contains("A fatal error has been detected by the Java Runtime Environment")) {
             /* Always consider "fatal error" in output as fail */
-            failedMessage(name, fullOptionString, valid, "JVM output reports a fatal error. JVM exited with code " + exitCode + "!");
-            printOutputContent(out);
-            result = false;
+            errorMessage = "JVM output reports a fatal error. JVM exited with code " + exitCode + "!";
         } else if (valid == true) {
             if (!allowedExitCodes.contains(exitCode)) {
-                failedMessage(name, fullOptionString, valid, "JVM exited with unexpected error code = " + exitCode);
-                printOutputContent(out);
-                result = false;
+                errorMessage = "JVM exited with unexpected error code = " + exitCode;
             } else if ((exitCode != 0) && (out.getOutput().isEmpty() == true)) {
-                failedMessage(name, fullOptionString, valid, "JVM exited with error(exitcode == " + exitCode +
-                        "), but with empty stdout and stderr. Description of error is needed!");
-                result = false;
+                errorMessage = "JVM exited with error(exitcode == " + exitCode + "), but with empty stdout and stderr. " +
+                       "Description of error is needed!";
             } else if (out.getOutput().contains("is outside the allowed range")) {
-                failedMessage(name, fullOptionString, valid, "JVM output contains \"is outside the allowed range\"");
-                printOutputContent(out);
-                result = false;
+                errorMessage = "JVM output contains \"is outside the allowed range\"";
             }
         } else {
             // valid == false
+            String value = optionValue.substring(optionValue.lastIndexOf("=") + 1);
+            String errorMessageCommandLineValue = getErrorMessageCommandLine(value);
             if (exitCode == 0) {
-                failedMessage(name, fullOptionString, valid, "JVM successfully exit");
-                result = false;
+                errorMessage = "JVM successfully exit";
             } else if (exitCode != 1) {
-                failedMessage(name, fullOptionString, valid, "JVM exited with code "
-                        + exitCode + " which not equal to 1");
-                result = false;
-            } else if (!out.getOutput().contains(getErrorMessageCommandLine(value))) {
-                failedMessage(name, fullOptionString, valid, "JVM output does not contain "
-                        + "expected output \"" + getErrorMessageCommandLine(value) + "\"");
-                printOutputContent(out);
-                result = false;
+                errorMessage = "JVM exited with code " + exitCode + " which not equal to 1";
+            } else if (!out.getOutput().contains(errorMessageCommandLineValue)) {
+                errorMessage = "JVM output does not contain expected output \"" + errorMessageCommandLineValue + "\"";
             }
         }
 
+        if (errorMessage != null) {
+            String fullOptionString = String.format("%s %s %s %s",
+                    VMType == null ? "" : VMType, GCType == null ? "" : GCType, prependString.toString(), optionValue).trim().replaceAll("  +", " ");
+            failedMessage(name, fullOptionString, valid, errorMessage);
+            printOutputContent(out);
+            result = false;
+        }
+
         System.out.println("");
 
         return result;
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.Reader;
+import java.lang.management.GarbageCollectorMXBean;
+import java.lang.management.ManagementFactory;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -50,6 +52,9 @@
     /* Used to start the JVM with the same type as current */
     static String VMType;
 
+    /* Used to start the JVM with the same GC type as current */
+    static String GCType;
+
     private static Map<String, JVMOption> optionsAsMap;
 
     static {
@@ -64,6 +69,27 @@
         } else {
             VMType = null;
         }
+
+        List<GarbageCollectorMXBean> gcMxBeans = ManagementFactory.getGarbageCollectorMXBeans();
+
+        GCType = null;
+
+        for (GarbageCollectorMXBean gcMxBean : gcMxBeans) {
+            switch (gcMxBean.getName()) {
+                case "ConcurrentMarkSweep":
+                    GCType = "-XX:+UseConcMarkSweepGC";
+                    break;
+                case "MarkSweepCompact":
+                    GCType = "-XX:+UseSerialGC";
+                    break;
+                case "PS Scavenge":
+                    GCType = "-XX:+UseParallelGC";
+                    break;
+                case "G1 Old Generation":
+                    GCType = "-XX:+UseG1GC";
+                    break;
+            }
+        }
     }
 
     public static boolean fitsRange(String optionName, BigDecimal number) throws Exception {
@@ -443,6 +469,10 @@
         if (VMType != null) {
             runJava.add(VMType);
         }
+
+        if (GCType != null) {
+            runJava.add(GCType);
+        }
         runJava.add(PRINT_FLAGS_RANGES);
         runJava.add("-version");
 
@@ -534,9 +564,4 @@
     public static Map<String, JVMOption> getOptionsWithRangeAsMap(String... additionalArgs) throws Exception {
         return getOptionsWithRangeAsMap(origin -> true, additionalArgs);
     }
-
-    /* Simple method to test that java start-up. Used for testing options. */
-    public static void main(String[] args) {
-        System.out.print("Java start-up!");
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMStartup.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package optionsvalidation;
+
+import java.lang.ref.WeakReference;
+
+class JVMStartup {
+    private static volatile WeakReference<Object> weakRef;
+
+    private static synchronized void createWeakRef() {
+        Object o = new Object();
+        weakRef = new WeakReference<>(o);
+    }
+
+    /* Simple method to test that java start-up. Used for testing options. */
+    public static void main(String[] args) throws Exception {
+        byte[] garbage = new byte[8192];
+        int i = 0;
+        createWeakRef();
+        do {
+            garbage = new byte[8192];
+            i++;
+            /* Initiate GC after 5 iterations */
+            if (i > 5) {
+                System.gc();
+            }
+        } while(weakRef.get() != null);
+        System.out.println("Java start-up!");
+    }
+}
--- a/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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,9 @@
  * @bug 8076110
  * @summary Redefine running methods that have cached resolution errors
  * @library /testlibrary
- * @modules java.instrument
- *          java.base/jdk.internal.org.objectweb.asm
+ * @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
--- a/hotspot/test/runtime/ReservedStack/ReservedStackTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/ReservedStack/ReservedStackTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
 /*
  * @test ReservedStackTest
  * @library /testlibrary
+ * @modules java.base/jdk.internal.vm.annotation
  * @build jdk.test.lib.*
  * @run main/othervm -XX:-Inline -XX:CompileCommand=exclude,java/util/concurrent/locks/AbstractOwnableSynchronizer.setExclusiveOwnerThread ReservedStackTest
  */
--- a/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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 @@
  * @library /testlibrary /runtime/CommandLine/OptionsValidation/common
  * @modules java.base/sun.misc
  *          java.management
+ *          jdk.attach/sun.tools.attach
  * @run main LimitSharedSizes
  */
 
--- a/hotspot/test/runtime/contended/Basic.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/contended/Basic.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@
  * @test
  * @bug     8003985
  * @summary Support Contended Annotation - JEP 142
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.vm.annotation
  * @run main/othervm -XX:-RestrictContended Basic
  */
 public class Basic {
--- a/hotspot/test/runtime/contended/DefaultValue.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/contended/DefaultValue.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
  * @bug     8014509
  * @summary \@Contended: explicit default value behaves differently from the implicit value
  *
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.vm.annotation
  * @run main/othervm -XX:-RestrictContended DefaultValue
  */
 public class DefaultValue {
--- a/hotspot/test/runtime/contended/HasNonStatic.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/contended/HasNonStatic.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
  * @bug     8015270
  * @summary \@Contended: fix multiple issues in the layout code
  *
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.vm.annotation
  * @run main/othervm -XX:-RestrictContended HasNonStatic
  */
 public class HasNonStatic {
--- a/hotspot/test/runtime/contended/Inheritance1.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/contended/Inheritance1.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
  * @bug     8012939
  * @summary \@Contended doesn't work correctly with inheritance
  *
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.vm.annotation
  * @run main/othervm -XX:-RestrictContended Inheritance1
  */
 public class Inheritance1 {
--- a/hotspot/test/runtime/contended/OopMaps.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/contended/OopMaps.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
  * @bug     8015493
  * @summary \@Contended: fix multiple issues in the layout code
  *
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.vm.annotation
  * @run main/othervm -XX:-RestrictContended -XX:ContendedPaddingWidth=128 -Xmx128m OopMaps
  */
 public class OopMaps {
--- a/hotspot/test/runtime/contended/OopMapsSameGroup.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/contended/OopMapsSameGroup.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
  * @bug     8015272
  * @summary \@Contended within the same group to use the same oop map
  *
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.vm.annotation
  * @run main/othervm -XX:-RestrictContended -XX:ContendedPaddingWidth=128 -Xmx128m OopMapsSameGroup
  */
 public class OopMapsSameGroup {
--- a/hotspot/test/runtime/lambda-features/TestStaticandInstance.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/runtime/lambda-features/TestStaticandInstance.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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 @@
  * @test
  * @bug 8087342
  * @summary Test linkresolver search static, instance and overpass duplicates
+ * @modules java.base/jdk.internal.org.objectweb.asm
  * @run main/othervm -Xverify:none TestStaticandInstance
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/logging/BiasedLockingTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8149383
+ * @summary -Xlog:biasedlocking should have logging from statements in the source code
+ * @library /testlibrary
+ * @modules java.base/sun.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;
+
+public class BiasedLockingTest {
+    static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldContain("Biased locking enabled");
+        output.shouldHaveExitValue(0);
+    }
+
+    static void analyzeOutputOff(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldNotContain("[biasedlocking]");
+        output.shouldHaveExitValue(0);
+    }
+
+    public static void main(String[] args) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:biasedlocking",
+                                                                  "-XX:BiasedLockingStartupDelay=0",
+                                                                  InnerClass.class.getName());
+        analyzeOutputOn(pb);
+
+        pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceBiasedLocking",
+                                                   "-XX:BiasedLockingStartupDelay=0",
+                                                   InnerClass.class.getName());
+        analyzeOutputOn(pb);
+
+        pb = ProcessTools.createJavaProcessBuilder("-Xlog:biasedlocking=off",
+                                                   "-XX:BiasedLockingStartupDelay=0",
+                                                   InnerClass.class.getName());
+        analyzeOutputOff(pb);
+
+        pb = ProcessTools.createJavaProcessBuilder("-XX:-TraceBiasedLocking",
+                                                   "-XX:BiasedLockingStartupDelay=0",
+                                                   InnerClass.class.getName());
+        analyzeOutputOff(pb);
+    }
+
+    public static class InnerClass {
+        public static void main(String[] args) {
+            System.out.println("Biased Locking test");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/logging/StartupTimeTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8148630
+ * @summary -Xlog:startuptime should produce logging from the source code
+ * @library /testlibrary
+ * @modules java.base/sun.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;
+
+public class StartupTimeTest {
+    static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldMatch("(Genesis, [0-9]+.[0-9]+ secs)");
+        output.shouldMatch("(Start VMThread, [0-9]+.[0-9]+ secs)");
+        output.shouldMatch("(Create VM, [0-9]+.[0-9]+ secs)");
+        output.shouldHaveExitValue(0);
+    }
+
+    static void analyzeOutputOff(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldNotContain("[startuptime]");
+        output.shouldHaveExitValue(0);
+    }
+
+    public static void main(String[] args) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime",
+                                                                  InnerClass.class.getName());
+        analyzeOutputOn(pb);
+
+        pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime=off",
+                                                   InnerClass.class.getName());
+        analyzeOutputOff(pb);
+    }
+
+    public static class InnerClass {
+        public static void main(String[] args) throws Exception {
+            System.out.println("Testing startuptime.");
+        }
+    }
+}
--- a/hotspot/test/serviceability/attach/AttachSetGetFlag.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/serviceability/attach/AttachSetGetFlag.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 @@
  *          jdk.attach/sun.tools.attach
  *          jdk.jvmstat/sun.jvmstat.monitor
  * @build jdk.test.lib.* AttachSetGetFlag
- * @run driver AttachSetGetFlag
+ * @run main AttachSetGetFlag
  */
 
 import java.io.BufferedReader;
--- a/hotspot/test/serviceability/attach/AttachWithStalePidFile.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/serviceability/attach/AttachWithStalePidFile.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
  * @bug 7162400
  * @key regression
  * @summary Regression test for attach issue where stale pid files in /tmp lead to connection issues
+ * @modules jdk.attach/sun.tools.attach
  * @library /testlibrary
  * @build jdk.test.lib.* AttachWithStalePidFileTarget
  * @run main AttachWithStalePidFile
--- a/hotspot/test/serviceability/dcmd/gc/HeapDumpAllTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/serviceability/dcmd/gc/HeapDumpAllTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -35,7 +35,7 @@
  * @build jdk.test.lib.hprof.*
  * @build jdk.test.lib.hprof.model.*
  * @build jdk.test.lib.hprof.parser.*
- * @build jdk.test.lib.hprof.utils.*
+ * @build jdk.test.lib.hprof.util.*
  * @build HeapDumpTest
  * @run testng HeapDumpAllTest
  */
--- a/hotspot/test/serviceability/dcmd/gc/HeapDumpTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/serviceability/dcmd/gc/HeapDumpTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -51,7 +51,7 @@
  * @build jdk.test.lib.hprof.*
  * @build jdk.test.lib.hprof.model.*
  * @build jdk.test.lib.hprof.parser.*
- * @build jdk.test.lib.hprof.utils.*
+ * @build jdk.test.lib.hprof.util.*
  * @run testng HeapDumpTest
  */
 public class HeapDumpTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,112 @@
+/*
+ * 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.*;
+import java.nio.file.*;
+import jdk.test.lib.*;
+import jdk.test.lib.dcmd.*;
+import org.testng.annotations.Test;
+
+/*
+ * Test to attach JVMTI java agent.
+ *
+ * @test
+ * @bug 8147388
+ * @library /testlibrary
+ * @modules java.base/sun.misc
+ *          java.compiler
+ *          java.instrument
+ *          java.management
+ *          jdk.jvmstat/sun.jvmstat.monitor
+ * @build ClassFileInstaller jdk.test.lib.* SimpleJvmtiAgent
+ * @ignore 8150318
+ * @run main ClassFileInstaller SimpleJvmtiAgent
+ * @run testng LoadAgentDcmdTest
+ */
+public class LoadAgentDcmdTest {
+
+    public String getLibInstrumentPath() throws FileNotFoundException {
+        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'.");
+        }
+
+        Path libpath;
+        if (Platform.isWindows()) {
+            libpath = Paths.get(jdkPath, "bin", "instrument.dll");
+        } else {
+            libpath = Paths.get(jdkPath, "lib", Platform.getOsArch(), "libinstrument.so");
+        }
+
+        if (!libpath.toFile().exists()) {
+            throw new FileNotFoundException(
+                      "Could not find " + libpath.toAbsolutePath());
+        }
+
+        return libpath.toAbsolutePath().toString();
+    }
+
+    public void run(CommandExecutor executor)  {
+        try{
+            PrintWriter pw = new PrintWriter("MANIFEST.MF");
+            pw.println("Agent-Class: SimpleJvmtiAgent");
+            pw.close();
+
+            ProcessBuilder pb = new ProcessBuilder();
+            pb.command(new String[] { JDKToolFinder.getJDKTool("jar"),
+                                      "cmf",
+                                      "MANIFEST.MF",
+                                      "agent.jar",
+                                      "SimpleJvmtiAgent.class"});
+            pb.start().waitFor();
+
+            String libpath = getLibInstrumentPath();
+
+            // Test 1: No argument
+            OutputAnalyzer output = executor.execute("JVMTI.agent_load " +
+                                                     libpath + " agent.jar");
+            output.stderrShouldBeEmpty();
+
+            // Test 2: With argument
+            output = executor.execute("JVMTI.agent_load " +
+                                      libpath + " \"agent.jar=foo=bar\"");
+            output.stderrShouldBeEmpty();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Test
+    public void jmx() throws Throwable {
+        run(new JMXExecutor());
+    }
+
+    @Test
+    public void cli() throws Throwable {
+        run(new PidJcmdExecutor());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/dcmd/jvmti/LoadJavaAgentDcmdTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,81 @@
+/*
+ * 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.*;
+import jdk.test.lib.*;
+import jdk.test.lib.dcmd.*;
+import org.testng.annotations.Test;
+
+/*
+ * Test to attach JVMTI java agent.
+ *
+ * @test
+ * @bug 8147388
+ * @library /testlibrary
+ * @modules java.base/sun.misc
+ *          java.compiler
+ *          java.instrument
+ *          java.management
+ *          jdk.jvmstat/sun.jvmstat.monitor
+ * @build ClassFileInstaller jdk.test.lib.* SimpleJvmtiAgent
+ * @run main ClassFileInstaller SimpleJvmtiAgent
+ * @run testng LoadJavaAgentDcmdTest
+ */
+public class LoadJavaAgentDcmdTest {
+    public void run(CommandExecutor executor)  {
+        try{
+            PrintWriter pw = new PrintWriter("MANIFEST.MF");
+            pw.println("Agent-Class: SimpleJvmtiAgent");
+            pw.close();
+
+            ProcessBuilder pb = new ProcessBuilder();
+            pb.command(new String[] { JDKToolFinder.getJDKTool("jar"),
+                                      "cmf",
+                                      "MANIFEST.MF",
+                                      "agent.jar",
+                                      "SimpleJvmtiAgent.class"});
+            pb.start().waitFor();
+
+            // Test 1: No argument
+            OutputAnalyzer output = executor.execute("JVMTI.agent_load " +
+                                                     "agent.jar");
+            output.stderrShouldBeEmpty();
+
+            // Test 2: With argument
+            output = executor.execute("JVMTI.agent_load " +
+                                      "\"agent.jar=foo=bar\"");
+            output.stderrShouldBeEmpty();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Test
+    public void jmx() throws Throwable {
+        run(new JMXExecutor());
+    }
+
+    @Test
+    public void cli() throws Throwable {
+        run(new PidJcmdExecutor());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/dcmd/jvmti/SimpleJvmtiAgent.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * 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.lang.instrument.*;
+
+public class SimpleJvmtiAgent {
+    public static void agentmain(String agentArgs, Instrumentation instrumentation) {
+        System.out.println("attach succeeded (args: \"" + agentArgs + "\")");
+    }
+}
--- a/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -27,6 +27,7 @@
  * @test
  * @summary Test checks the consistency of the output
  * displayed with jstat -gccapacity.
+ * @ignore 8149778
  * @library /test/lib/share/classes
  * @library ../share
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
--- a/hotspot/test/testlibrary_tests/ctw/ClassesDirTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/testlibrary_tests/ctw/ClassesDirTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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 8012447
  * @library /testlibrary /test/lib /testlibrary/ctw/src
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  *          java.base/sun.reflect
  *          java.management
  * @build ClassFileInstaller sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar
--- a/hotspot/test/testlibrary_tests/ctw/ClassesListTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/testlibrary_tests/ctw/ClassesListTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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 8012447
  * @library /testlibrary /test/lib /testlibrary/ctw/src
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  *          java.base/sun.reflect
  *          java.management
  * @build ClassFileInstaller sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar
--- a/hotspot/test/testlibrary_tests/ctw/JarDirTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/testlibrary_tests/ctw/JarDirTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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 8012447
  * @library /testlibrary /test/lib /testlibrary/ctw/src
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  *          java.base/sun.reflect
  *          java.compiler
  *          java.management
--- a/hotspot/test/testlibrary_tests/ctw/JarsTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/hotspot/test/testlibrary_tests/ctw/JarsTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO 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 8012447
  * @library /testlibrary /test/lib /testlibrary/ctw/src
- * @modules java.base/sun.misc
+ * @modules java.base/jdk.internal.misc
  *          java.base/sun.reflect
  *          java.compiler
  *          java.management
--- a/jaxp/.hgtags	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxp/.hgtags	Mon Mar 07 16:38:23 2016 -0800
@@ -350,3 +350,4 @@
 5acf6071d4d610068a19c79e004ba8e59cf1b087 jdk-9+105
 65d615f71e81bae46dcb4d053e590582e5705879 jdk-9+106
 781b83dadcae89b8ae7545bb4044ddc62c6fa006 jdk-9+107
+3b9fa8b1491479f7ae18131a34036b58b647493e jdk-9+108
--- a/jaxws/.hgtags	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/.hgtags	Mon Mar 07 16:38:23 2016 -0800
@@ -353,3 +353,4 @@
 45a666c58e4c7d07638878684ad09decb3229dc9 jdk-9+105
 c072c572d14948563ef5d86e1921699b3a2396ab jdk-9+106
 fafd694e801f0f5a7c737fb08630ced3ca8f772c jdk-9+107
+513eb2e432f64f85992442da9acdfcfbb36555d9 jdk-9+108
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Const.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Const.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, 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,12 +29,12 @@
  * @author Kohsuke Kawaguchi
  */
 public final class Const {
-    public static byte default_value_byte = 0;
-    public static boolean default_value_boolean = false;
-    public static char default_value_char = 0;
-    public static float default_value_float = 0;
-    public static double default_value_double = 0;
-    public static int default_value_int = 0;
-    public static long default_value_long = 0;
-    public static short default_value_short = 0;
+    public static final byte default_value_byte = 0;
+    public static final boolean default_value_boolean = false;
+    public static final char default_value_char = 0;
+    public static final float default_value_float = 0;
+    public static final double default_value_double = 0;
+    public static final int default_value_int = 0;
+    public static final long default_value_long = 0;
+    public static final short default_value_short = 0;
 }
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -231,22 +231,11 @@
     @Override
     public void childElement(UnmarshallingContext.State state, TagName arg) throws SAXException {
         ChildLoader child = childUnmarshallers.get(arg.uri,arg.local);
-        if(child==null) {
-            if ((beanInfo != null) && (beanInfo.getTypeNames() != null)) {
-                Iterator typeNamesIt = beanInfo.getTypeNames().iterator();
-                QName parentQName = null;
-                if ((typeNamesIt != null) && (typeNamesIt.hasNext()) && (catchAll == null)) {
-                    parentQName = (QName) typeNamesIt.next();
-                    String parentUri = parentQName.getNamespaceURI();
-                    child = childUnmarshallers.get(parentUri, arg.local);
-                }
-            }
-            if (child == null) {
-                child = catchAll;
-                if(child==null) {
-                    super.childElement(state,arg);
-                    return;
-                }
+        if (child == null) {
+            child = catchAll;
+            if (child==null) {
+                super.childElement(state,arg);
+                return;
             }
         }
 
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -110,6 +110,7 @@
 import com.sun.xml.internal.txw2.output.ResultFactory;
 import com.sun.xml.internal.txw2.output.XmlSerializer;
 import java.util.Collection;
+import java.util.HashSet;
 import org.xml.sax.SAXParseException;
 
 /**
@@ -436,7 +437,7 @@
 
         if(logger.isLoggable(Level.FINE)) {
             // debug logging to see what's going on.
-            logger.log(Level.FINE,"Wrigin XML Schema for "+toString(),new StackRecorder());
+            logger.log(Level.FINE,"Writing XML Schema for "+toString(),new StackRecorder());
         }
 
         // make it fool-proof
@@ -465,6 +466,8 @@
                     systemIds.put(n,output.getSystemId());
                 }
             }
+            //Clear the namespace specific set with already written classes
+            n.resetWritten();
         }
 
         // then write'em all
@@ -542,6 +545,11 @@
          */
         private boolean useMimeNs;
 
+        /**
+         * Container for already processed classes
+         */
+        private final Set<ClassInfo> written = new HashSet<ClassInfo>();
+
         public Namespace(String uri) {
             this.uri = uri;
             assert !XmlSchemaGenerator.this.namespaces.containsKey(uri);
@@ -549,6 +557,13 @@
         }
 
         /**
+         * Clear out the set of already processed classes for this namespace
+         */
+        void resetWritten() {
+            written.clear();
+        }
+
+        /**
          * Process the given PropertyInfo looking for references to namespaces that
          * are foreign to the given namespace.  Any foreign namespace references
          * found are added to the given namespaces dependency list and an {@code <import>}
@@ -853,6 +868,10 @@
          * @param parent the writer of the parent element into which the type will be defined
          */
         private void writeClass(ClassInfo<T,C> c, TypeHost parent) {
+            if (written.contains(c)) { // to avoid cycles let's check if we haven't already processed the class
+                return;
+            }
+            written.add(c);
             // special handling for value properties
             if (containsValueProp(c)) {
                 if (c.getProperties().size() == 1) {
@@ -1080,9 +1099,13 @@
                                            }
                                        }
                                     }
-                                    if (cImpl != null)
-                                        e.ref(new QName(cImpl.getElementName().getNamespaceURI(), tn.getLocalPart()));
-                                    else
+                                    if (cImpl != null) {
+                                        if (tn.getNamespaceURI() != null && tn.getNamespaceURI().trim().length() != 0) {
+                                            e.ref(new QName(tn.getNamespaceURI(), tn.getLocalPart()));
+                                        } else {
+                                            e.ref(new QName(cImpl.getElementName().getNamespaceURI(), tn.getLocalPart()));
+                                        }
+                                    } else
                                         e.ref(new QName("", tn.getLocalPart()));
                                 } else
                                     e.ref(tn);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -512,13 +512,9 @@
                         : httpConnection.getInputStream());
                 // If no reply message is returned,
                 // content-Length header field value is expected to be zero.
-                // java SE 6 documentation says :
-                // available() : an estimate of the number of bytes that can be read
-                //(or skipped over) from this input stream without blocking
-                //or 0 when it reaches the end of the input stream.
+                // InputStream#available() can't be used here - it just says no data *YET*!
                 if ((httpIn == null )
-                        || (httpConnection.getContentLength() == 0)
-                        || (httpIn.available() == 0)) {
+                        || (httpConnection.getContentLength() == 0)) {
                     response = null;
                     log.warning("SAAJ0014.p2p.content.zero");
                 } else {
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, 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
@@ -285,7 +285,7 @@
      *
      * @return  Header objects
      */
-    public FinalArrayList<hdr> getAllHeaders() {
+    public List<? extends Header> getAllHeaders() {
         return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here
     }
 
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -32,6 +32,7 @@
 package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
 
 
+import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
 import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
 import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil;
 import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
@@ -1041,7 +1042,7 @@
      * Return all the headers from this Message as an Enumeration of
      * Header objects.
      */
-    public FinalArrayList<hdr> getAllHeaders() {
+    public List<? extends Header> getAllHeaders() {
         return headers.getAllHeaders();
     }
 
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 @@
 
 /**
  * Simple utility class to instantiate correct Thread instance
- * depending on runtime context (jdk/non-jdk usage) and Java version.
+ * depending on Java version.
  *
  * @author miroslav.kos@oracle.com
  */
@@ -101,16 +101,16 @@
         SunMiscThreadFactory(Constructor<?> ctr) { this.ctr = ctr; }
         @Override public Thread newThread(Runnable r) {
             return AccessController.doPrivileged(
-                new PrivilegedAction<Thread>() {
-                    @Override
-                    public Thread run() {
-                        try {
-                            return (Thread) ctr.newInstance(r);
-                        } catch (Exception e) {
-                            return new Thread(r);
+                    new PrivilegedAction<Thread>() {
+                        @Override
+                        public Thread run() {
+                            try {
+                                return (Thread) ctr.newInstance(r);
+                            } catch (Exception e) {
+                                return new Thread(r);
+                            }
                         }
                     }
-                }
             );
         }
     }
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/Headers.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/Headers.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -127,5 +127,17 @@
         l.add (value);
         put(key, l);
     }
+    /**
+     * Added to fix issue
+     * putAll() is easier to deal with as it doesn't return anything
+     */
+    public void putAll(Map<? extends String,? extends List<String>> map) {
+        for (String k : map.keySet()) {
+            List<String> list = map.get(k);
+            for (String v : list) {
+                add(k,v);
+            }
+        }
+    }
 
 }
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/ServiceFinder.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/ServiceFinder.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -338,13 +338,13 @@
             int lc = 1;
             while ((lc = parseLine(service, u, r, lc, names, returned)) >= 0) ;
         } catch (IOException x) {
-            fail(service, ": " + x);
+            fail(service, ": " + x +";URL is :"+u.toString());
         } finally {
             try {
                 if (r != null) r.close();
                 if (in != null) in.close();
             } catch (IOException y) {
-                fail(service, ": " + y);
+                fail(service, ": " + y +";URL is :"+u.toString());
             }
         }
         return names.iterator();
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -26,4 +26,4 @@
 build-id=2.3.0-SNAPSHOT
 build-version=JAX-WS RI 2.3.0-SNAPSHOT
 major-version=2.3.0
-svn-revision=ffaa49e66cc05e1bb2ddc103076a340dad5df997
+svn-revision=282759e2b822078de9ba78c743ed663541c16ead
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -184,7 +184,7 @@
     private static String fromJDKProperties(String factoryId, String deprecatedFactoryId) {
         Path path = null;
         try {
-            String JAVA_HOME = System.getProperty("java.home");
+            String JAVA_HOME = getSystemProperty("java.home");
             path = Paths.get(JAVA_HOME, "conf", "jaxm.properties");
             logger.log(Level.FINE, "Checking configuration in {0}", path);
 
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/FactoryFinder.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/FactoryFinder.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -137,7 +137,8 @@
         } catch (Exception ignored) {
             logger.log(Level.SEVERE, "Error reading JAX-WS configuration from ["  + path +
                     "] file. Check it is accessible and has correct format.", ignored);
-        }        return null;
+        }
+        return null;
     }
 
     private static final String OSGI_SERVICE_LOADER_CLASS_NAME = "com.sun.org.glassfish.hk2.osgiresourcelocator.ServiceLoader";
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -85,7 +85,7 @@
      *      ("my_children","MyChildren","myChildren", and "MY-CHILDREN", "CODE003-children" respectively)
      *      <p>
      *      Although this method only works for English words, it handles non-English
-     *      words gracefully (by just returning it as-is.) For example, &#x65E5;&#x672C;&#x8A9E;
+     *      words gracefully (by just returning it as-is.) For example, "&#x65E5;&#x672C;&#x8A9E;"
      *      will be returned as-is without modified, not "&#x65E5;&#x672C;&#x8A9E;s"
      *      <p>
      *      This method doesn't handle suffixes very well. For example, passing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,49 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = \
+    Unexpected {0} appears at line {1} column {2}
+
+BASEDIR_DOESNT_EXIST = \
+    Non-existent directory: {0}
+
+VERSION = \
+        schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = \
+        schemagen full version "2.3.0-SNAPSHOT"
+
+USAGE = \
+Usage: schemagen [-options ...] <java files> \n\
+Options: \n\
+\ \ \ \ -d <path>             : specify where to place processor and javac generated class files\n\
+\ \ \ \ -cp <path>            : specify where to find user specified files\n\
+\ \ \ \ -classpath <path>     : specify where to find user specified files\n\
+\ \ \ \ -encoding <encoding>  : specify encoding to be used for annotation processing/javac invocation \n\
+\ \ \ \ -episode <file>       : generate episode file for separate compilation\n\
+\ \ \ \ -disableXmlSecurity  :  disables XML security features for usage on xml parsing apis \n\
+\ \ \ \ -version              : display version information\n\
+\ \ \ \ -fullversion          : display full version information\n\
+\ \ \ \ -help                 : display this usage message
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = Nicht erkanntes {0} in Zeile {1} Spalte {2}
+
+BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0}
+
+VERSION = schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = schemagen vollst\u00E4ndige Version "2.3.0-SNAPSHOT"
+
+USAGE = Verwendung: schemagen [-options ...] <java files> \nOptionen: \n\\ \\ \\ \\ -d <path>             : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp <path>            : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath <path>     : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding <encoding>  : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode <file>       : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version              : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion          : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help                 : Zeigt diese Verwendungsmeldung an
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = Aparece un {0} inesperado en la l\u00EDnea {1} y la columna {2}
+
+BASEDIR_DOESNT_EXIST = Directorio no existente: {0}
+
+VERSION = schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = versi\u00F3n completa de schemagen "2.3.0-SNAPSHOT"
+
+USAGE = Sintaxis: schemagen [-options ...] <archivos java> \nOpciones: \n\\ \\ \\ \\ -d <ruta de acceso>             : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp <ruta de acceso>            : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding <codificaci\u00F3n>  : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode <archivo>       : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version              : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion          : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help                 : muestra este mensaje de sintaxis
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = Un \u00E9l\u00E9ment {0} inattendu appara\u00EEt \u00E0 la ligne {1}, colonne {2}
+
+BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant
+
+VERSION = schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = version compl\u00E8te de schemagen "2.3.0-SNAPSHOT"
+
+USAGE = Syntaxe : schemagen [-options ...] <java files> \nOptions : \n\ \ \ \ -d <path> : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding <encoding> : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode <file> : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = {0} imprevisto visualizzato sulla riga {1} colonna {2}
+
+BASEDIR_DOESNT_EXIST = Directory non esistente: {0}
+
+VERSION = schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = versione completa schemagen "2.3.0-SNAPSHOT"
+
+USAGE = Uso: schemagen [-options ...] <java files> \nOpzioni: \n\ \ \ \ -d <path>             : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp <path>            : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath <path>     : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding <encoding>  : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode <file>       : genera il file di episodio per la compilazione separata\n\ \ \ \ -version              : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion          : visualizza le informazioni sulla versione completa\n\ \ \ \ -help                 : visualizza questo messaggio sull'uso
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = \u4E88\u671F\u3057\u306A\u3044{0}\u304C\u884C{1}\u3001\u5217{2}\u306B\u3042\u308A\u307E\u3059
+
+BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
+
+VERSION = schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-SNAPSHOT"
+
+USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] <java files> \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d <path>             : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp <path>            : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath <path>     : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding <encoding>  : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode <file>       : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version              : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion          : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help                 : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = \uC608\uC0C1\uCE58 \uC54A\uC740 {0}\uC774(\uAC00) {1}\uD589 {2}\uC5F4\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.
+
+BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0}
+
+VERSION = schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.3.0-SNAPSHOT"
+
+USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] <java files> \n\uC635\uC158: \n\ \ \ \ -d <path>             : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp <path>            : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath <path>     : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding <encoding>  : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode <file>       : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version              : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion          : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help                 : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = {0} inesperado aparece na linha {1} coluna {2}
+
+BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0}
+
+VERSION = gera\u00E7\u00E3o do esquema 2.3.0-SNAPSHOT
+
+FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.3.0-SNAPSHOT"
+
+USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] <java files> \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d <path>             : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp <path>            : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath <path>     : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding <encoding>  : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode <file>       : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version              : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion          : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help                 : exibir esta mensagem de uso
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = \u5728\u7B2C {1} \u884C, \u7B2C {2} \u5217\u51FA\u73B0\u610F\u5916\u7684{0}
+
+BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0}
+
+VERSION = schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT"
+
+USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9009\u9879: \n\ \ \ \ -d <path>             : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp <path>            : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath <path>     : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding <encoding>  : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode <file>       : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version              : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion          : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help                 : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+UNEXPECTED_NGCC_TOKEN = \u672A\u9810\u671F\u7684 {0} \u986F\u793A\u65BC\u884C {1} \u8CC7\u6599\u6B04 {2}
+
+BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0}
+
+VERSION = schemagen 2.3.0-SNAPSHOT
+
+FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT"
+
+USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9078\u9805: \n\\ \\ \\ \\ -d <path>             : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp <path>            : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath <path>     : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding <encoding>  : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode <file>       : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version              : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion          : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help                 : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,33 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = \
+    Directory "{0}" doesn't exist.
+
+UNRECOGNIZED_PARAMETER = \
+    Unrecognized option {0} is not valid.
+
+OPERAND_MISSING = \
+    Option "{0}" is missing an operand.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = Verzeichnis "{0}" ist nicht vorhanden.
+
+UNRECOGNIZED_PARAMETER = Unbekannte Option {0} ist nicht g\u00FCltig.
+
+OPERAND_MISSING = In Option "{0}" fehlt ein Operand.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = El directorio "{0}" no existe.
+
+UNRECOGNIZED_PARAMETER = La opci\u00F3n no reconocida {0} no es v\u00E1lida.
+
+OPERAND_MISSING = A la opci\u00F3n "{0}" le falta un operando.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = Le r\u00E9pertoire "{0}" n''existe pas.
+
+UNRECOGNIZED_PARAMETER = L''option {0} non reconnue n''est pas valide.
+
+OPERAND_MISSING = Un op\u00E9rande est manquant dans l''option "{0}".
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = La directory "{0}" non esiste.
+
+UNRECOGNIZED_PARAMETER = L''opzione non riconosciuta {0} non \u00E8 valida.
+
+OPERAND_MISSING = Operando mancante nell''opzione "{0}".
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA"{0}"\u304C\u5B58\u5728\u3057\u307E\u305B\u3093\u3002
+
+UNRECOGNIZED_PARAMETER = \u8A8D\u8B58\u3055\u308C\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306F\u7121\u52B9\u3067\u3059\u3002
+
+OPERAND_MISSING = \u30AA\u30D7\u30B7\u30E7\u30F3"{0}"\u306B\u30AA\u30DA\u30E9\u30F3\u30C9\u304C\u3042\u308A\u307E\u305B\u3093\u3002
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = "{0}" \uB514\uB809\uD1A0\uB9AC\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+
+UNRECOGNIZED_PARAMETER = \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC635\uC158 {0}\uC740(\uB294) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
+
+OPERAND_MISSING = "{0}" \uC635\uC158\uC5D0 \uD53C\uC5F0\uC0B0\uC790\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = O diret\u00F3rio "{0}" n\u00E3o existe.
+
+UNRECOGNIZED_PARAMETER = A op\u00E7\u00E3o {0} n\u00E3o reconhecida \u00E9 inv\u00E1lida.
+
+OPERAND_MISSING = A op\u00E7\u00E3o "{0}" n\u00E3o encontrou um operando.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = \u76EE\u5F55 "{0}" \u4E0D\u5B58\u5728\u3002
+
+UNRECOGNIZED_PARAMETER = \u65E0\u6CD5\u8BC6\u522B\u7684\u9009\u9879{0}, \u8BE5\u9009\u9879\u65E0\u6548\u3002
+
+OPERAND_MISSING = \u9009\u9879 "{0}" \u7F3A\u5C11\u64CD\u4F5C\u6570\u3002
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,30 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+NON_EXISTENT_FILE = \u76EE\u9304 "{0}" \u4E0D\u5B58\u5728.
+
+UNRECOGNIZED_PARAMETER = \u7121\u6CD5\u8FA8\u8B58\u7684\u9078\u9805 {0} \u7121\u6548.
+
+OPERAND_MISSING = \u9078\u9805 "{0}" \u907A\u6F0F\u904B\u7B97\u5143.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CTypeRef.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CTypeRef.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -68,7 +68,6 @@
 
     public CTypeRef(CNonElement type, XSElementDecl decl) {
         this(type, BGMBuilder.getName(decl),getSimpleTypeName(decl), decl.isNillable(), decl.getDefaultValue() );
-
     }
 
     public QName getTypeName() {
@@ -100,10 +99,15 @@
      */
     private static QName resolveSimpleTypeName(XSType declType) {
         QName name = BGMBuilder.getName(declType);
-        if (name != null && !XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(name.getNamespaceURI()))
-            return resolveSimpleTypeName(declType.getBaseType());
-        else
-            return name;
+        QName result = null;
+        if (name != null && !XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(name.getNamespaceURI())) {
+            result = resolveSimpleTypeName(declType.getBaseType());
+        } else {
+            if ( !"anySimpleType".equals(declType.getName()) ) {
+                result = name;
+            }
+        }
+        return result;
     }
 
     public CTypeRef(CNonElement type, QName elementName, QName typeName, boolean nillable, XmlString defaultValue) {
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties	Mon Mar 07 11:54:42 2016 +0530
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -26,4 +26,4 @@
 build-id=2.3.0-SNAPSHOT
 build-version=JAX-WS RI 2.3.0-SNAPSHOT
 major-version=2.3.0
-svn-revision=ffaa49e66cc05e1bb2ddc103076a340dad5df997
+svn-revision=282759e2b822078de9ba78c743ed663541c16ead
--- a/jdk/.hgtags	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/.hgtags	Mon Mar 07 16:38:23 2016 -0800
@@ -350,3 +350,4 @@
 55518739e399a1066c8613e19100d51b38d9f223 jdk-9+105
 6e9ecae50b4e0d37483fb2719202eea5dca026a4 jdk-9+106
 8701b2bb1d2e1b9abc2a9be0933993c7150a9dbe jdk-9+107
+42794e648cfe9fd67461dcbe8b7594241a84bcff jdk-9+108
--- a/jdk/make/gendata/GendataHtml32dtd.gmk	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/make/gendata/GendataHtml32dtd.gmk	Mon Mar 07 16:38:23 2016 -0800
@@ -30,6 +30,6 @@
 	$(call LogInfo, Generating HTML DTD file)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
-	($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1
+	($(TOOL_DTDBUILDER) html32 > $@) || exit 1
 
 TARGETS += $(HTML32DTD)
--- a/jdk/make/gensrc/GensrcCLDR.gmk	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/make/gensrc/GensrcCLDR.gmk	Mon Mar 07 16:38:23 2016 -0800
@@ -30,7 +30,7 @@
 GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata
 
 CLDR_BASEMETAINFO_FILE := $(GENSRC_BASEDIR)/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java
-CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo_jdk_localedata.java
+CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.java
 
 CLDR_BASE_LOCALES := "en-US"
 
--- a/jdk/make/gensrc/GensrcMisc.gmk	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/make/gensrc/GensrcMisc.gmk	Mon Mar 07 16:38:23 2016 -0800
@@ -25,11 +25,11 @@
 
 ##########################################################################################
 # Install the launcher name, release version string, full version
-# string and the runtime name into the Version.java file.
+# string and the runtime name into the VersionProps.java file.
 
 $(eval $(call SetupTextFileProcessing, BUILD_VERSION_JAVA, \
-    SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/sun/misc/Version.java.template, \
-    OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java, \
+    SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/java/lang/VersionProps.java.template, \
+    OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/VersionProps.java, \
     REPLACEMENTS := \
         @@LAUNCHER_NAME@@ => $(LAUNCHER_NAME) ; \
         @@RUNTIME_NAME@@ => $(RUNTIME_NAME) ; \
--- a/jdk/make/mapfiles/libjava/mapfile-vers	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/make/mapfiles/libjava/mapfile-vers	Mon Mar 07 16:38:23 2016 -0800
@@ -268,8 +268,6 @@
 		Java_sun_reflect_Reflection_getCallerClass__;
 		Java_sun_reflect_Reflection_getCallerClass__I;
 		Java_sun_reflect_Reflection_getClassAccessFlags;
-                Java_sun_misc_Version_getJdkVersionInfo;
-                Java_sun_misc_Version_getJvmVersionInfo;
 		Java_jdk_internal_misc_VM_latestUserDefinedLoader;
                 Java_jdk_internal_misc_VM_getuid;
                 Java_jdk_internal_misc_VM_geteuid;
--- a/jdk/make/src/classes/build/tools/module/boot.modules	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/make/src/classes/build/tools/module/boot.modules	Mon Mar 07 16:38:23 2016 -0800
@@ -22,6 +22,7 @@
 jdk.deploy.osx
 jdk.httpserver
 jdk.jfr
+jdk.jsobject
 jdk.net
 jdk.vm.cds
 jdk.vm.ci
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -43,7 +43,7 @@
  * <li>By providing the size in bits of the prime modulus -
  * This will be used to create a prime modulus and base generator, which will
  * then be used to create the Diffie-Hellman key pair. The default size of the
- * prime modulus is 1024 bits.
+ * prime modulus is 2048 bits.
  * <li>By providing a prime modulus and base generator
  * </ul>
  *
@@ -68,7 +68,7 @@
 
     public DHKeyPairGenerator() {
         super();
-        initialize(1024, null);
+        initialize(2048, null);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/DHParameterGenerator.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/DHParameterGenerator.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -37,7 +37,7 @@
  *
  * <p>The Diffie-Hellman parameter generation accepts the size in bits of the
  * prime modulus and the size in bits of the random exponent as input.
- * The size of the prime modulus defaults to 1024 bits.
+ * The size of the prime modulus defaults to 2048 bits.
  *
  * @author Jan Luehe
  *
@@ -50,7 +50,7 @@
 extends AlgorithmParameterGeneratorSpi {
 
     // The size in bits of the prime modulus
-    private int primeSize = 1024;
+    private int primeSize = 2048;
 
     // The size in bits of the random exponent (private value)
     private int exponentSize = 0;
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, 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
@@ -50,6 +50,7 @@
     private CipherCore cipher;
     private int blockSize;
     private int keySize;
+    private int keyLength; // in bits
     private String algo = null;
     private String pbeAlgo = null;
     private byte[] salt = null;
@@ -166,16 +167,18 @@
         throws NoSuchAlgorithmException {
 
         algo = symmCipherAlg;
+        keyLength = defKeySize * 8;
         if (algo.equals("RC4")) {
-            pbeAlgo = "PBEWithSHA1AndRC4_" + defKeySize * 8;
+            pbeAlgo = "PBEWithSHA1AndRC4_" + keyLength;
         } else {
             SymmetricCipher symmCipher = null;
             if (algo.equals("DESede")) {
                 symmCipher = new DESedeCrypt();
                 pbeAlgo = "PBEWithSHA1AndDESede";
+                keyLength = 112; // effective key length
             } else if (algo.equals("RC2")) {
                 symmCipher = new RC2Crypt();
-                pbeAlgo = "PBEWithSHA1AndRC2_" + defKeySize * 8;
+                pbeAlgo = "PBEWithSHA1AndRC2_" + keyLength;
             } else {
                 throw new NoSuchAlgorithmException("No Cipher implementation " +
                        "for PBEWithSHA1And" + algo);
@@ -406,7 +409,7 @@
     }
 
     int implGetKeySize(Key key) throws InvalidKeyException {
-        return keySize;
+        return keyLength;
     }
 
     byte[] implWrap(Key key) throws IllegalBlockSizeException,
--- a/jdk/src/java.base/share/classes/java/lang/AbstractStringBuilder.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/lang/AbstractStringBuilder.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -133,39 +133,62 @@
     }
 
     /**
-     * This method has the same contract as ensureCapacity, but is
-     * never synchronized.
+     * For positive values of {@code minimumCapacity}, this method
+     * behaves like {@code ensureCapacity}, however it is never
+     * synchronized.
+     * If {@code minimumCapacity} is non positive due to numeric
+     * overflow, this method throws {@code OutOfMemoryError}.
      */
     private void ensureCapacityInternal(int minimumCapacity) {
         // overflow-conscious code
-        int capacity = value.length >> coder;
-        if (minimumCapacity - capacity > 0) {
-            expandCapacity(minimumCapacity);
+        int oldCapacity = value.length >> coder;
+        if (minimumCapacity - oldCapacity > 0) {
+            value = Arrays.copyOf(value,
+                    newCapacity(minimumCapacity) << coder);
         }
     }
 
     /**
-     * This implements the expansion semantics of ensureCapacity with no
-     * size check or synchronization.
+     * The maximum size of array to allocate (unless necessary).
+     * Some VMs reserve some header words in an array.
+     * Attempts to allocate larger arrays may result in
+     * OutOfMemoryError: Requested array size exceeds VM limit
      */
-    private void expandCapacity(int minimumCapacity) {
-        int newCapacity = (value.length >> coder) * 2 + 2;
-        if (newCapacity - minimumCapacity < 0) {
-            newCapacity = minimumCapacity;
+    private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
+
+    /**
+     * Returns a capacity at least as large as the given minimum capacity.
+     * Returns the current capacity increased by the same amount + 2 if
+     * that suffices.
+     * Will not return a capacity greater than
+     * {@code (MAX_ARRAY_SIZE >> coder)} unless the given minimum capacity
+     * is greater than that.
+     *
+     * @param  minCapacity the desired minimum capacity
+     * @throws OutOfMemoryError if minCapacity is less than zero or
+     *         greater than (Integer.MAX_VALUE >> coder)
+     */
+    private int newCapacity(int minCapacity) {
+        // overflow-conscious code
+        int oldCapacity = value.length >> coder;
+        int newCapacity = (oldCapacity << 1) + 2;
+        if (newCapacity - minCapacity < 0) {
+            newCapacity = minCapacity;
         }
-        if (newCapacity < 0) {
-            if (minimumCapacity < 0) {// overflow
-                throw new OutOfMemoryError();
-            }
-            newCapacity = Integer.MAX_VALUE;
+        int SAFE_BOUND = MAX_ARRAY_SIZE >> coder;
+        return (newCapacity <= 0 || SAFE_BOUND - newCapacity < 0)
+            ? hugeCapacity(minCapacity)
+            : newCapacity;
+    }
+
+    private int hugeCapacity(int minCapacity) {
+        int SAFE_BOUND = MAX_ARRAY_SIZE >> coder;
+        int UNSAFE_BOUND = Integer.MAX_VALUE >> coder;
+        if (UNSAFE_BOUND - minCapacity < 0) { // overflow
+            throw new OutOfMemoryError();
         }
-        if (coder != LATIN1 && newCapacity > StringUTF16.MAX_LENGTH) {
-            if (minimumCapacity >= StringUTF16.MAX_LENGTH) {
-                throw new OutOfMemoryError();
-            }
-            newCapacity = StringUTF16.MAX_LENGTH;
-        }
-        this.value = Arrays.copyOf(value, newCapacity << coder);
+        return (minCapacity > SAFE_BOUND)
+            ? minCapacity : SAFE_BOUND;
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/lang/System.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/lang/System.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1418,8 +1418,7 @@
          * for the given {@code caller}.
          *
          * @param name the name of the logger.
-         * @param caller the class for which the logger is being requested;
-         *               can be {@code null}.
+         * @param caller the class for which the logger is being requested.
          *
          * @return a {@link Logger logger} suitable for the given caller's
          *         use.
@@ -1831,7 +1830,7 @@
 
 
         lineSeparator = props.getProperty("line.separator");
-        sun.misc.Version.init();
+        VersionProps.init();
 
         FileInputStream fdIn = new FileInputStream(FileDescriptor.in);
         FileOutputStream fdOut = new FileOutputStream(FileDescriptor.out);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/VersionProps.java.template	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,114 @@
+/*
+ * 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang;
+
+import java.io.PrintStream;
+
+class VersionProps {
+
+
+    private static final String launcher_name =
+        "@@LAUNCHER_NAME@@";
+
+    private static final String java_version =
+        "@@VERSION_SHORT@@";
+
+    private static final String java_runtime_name =
+        "@@RUNTIME_NAME@@";
+
+    private static final String java_runtime_version =
+        "@@VERSION_STRING@@";
+
+    static {
+        init();
+    }
+
+    public static void init() {
+        System.setProperty("java.version", java_version);
+        System.setProperty("java.runtime.version", java_runtime_version);
+        System.setProperty("java.runtime.name", java_runtime_name);
+    }
+
+    /**
+     * In case you were wondering this method is called by java -version.
+     * Sad that it prints to stderr; would be nicer if default printed on
+     * stdout.
+     */
+    public static void print() {
+        print(System.err);
+    }
+
+    /**
+     * This is the same as print except that it adds an extra line-feed
+     * at the end, typically used by the -showversion in the launcher
+     */
+    public static void println() {
+        print(System.err);
+        System.err.println();
+    }
+
+    /**
+     * Give a stream, it will print version info on it.
+     */
+    public static void print(PrintStream ps) {
+        boolean isHeadless = false;
+
+        /* Report that we're running headless if the property is true */
+        String headless = System.getProperty("java.awt.headless");
+        if ( (headless != null) && (headless.equalsIgnoreCase("true")) ) {
+            isHeadless = true;
+        }
+
+        /* First line: platform version. */
+        ps.println(launcher_name + " version \"" + java_version + "\"");
+
+        /* Second line: runtime version (ie, libraries). */
+
+        String jdk_debug_level = System.getProperty("jdk.debug", "release");
+        /* Debug level is not printed for "release" builds */
+        if ("release".equals(jdk_debug_level)) {
+            jdk_debug_level = "";
+        } else {
+            jdk_debug_level = jdk_debug_level + " ";
+        }
+
+        ps.print(java_runtime_name + " (" + jdk_debug_level + "build " + java_runtime_version);
+
+        if (java_runtime_name.indexOf("Embedded") != -1 && isHeadless) {
+            // embedded builds report headless state
+            ps.print(", headless");
+        }
+        ps.println(')');
+
+        /* Third line: JVM information. */
+        String java_vm_name    = System.getProperty("java.vm.name");
+        String java_vm_version = System.getProperty("java.vm.version");
+        String java_vm_info    = System.getProperty("java.vm.info");
+        ps.println(java_vm_name + " (" + jdk_debug_level + "build " + java_vm_version + ", " +
+                   java_vm_info + ")");
+    }
+
+}
\ No newline at end of file
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Mon Mar 07 16:38:23 2016 -0800
@@ -3268,12 +3268,17 @@
      * <li>This list of types is called the "common prefix".
      * </ol>
      * <p>
-     * <em>Step 1B: Determine loop parameters.</em><ol type="a">
-     * <li>Examine init function parameter lists.
-     * <li>Omitted init functions are deemed to have {@code null} parameter lists.
-     * <li>All init function parameter lists must be effectively identical.
-     * <li>The longest parameter list (which is necessarily unique) is called the "common suffix".
+     * <em>Step 1B: Determine loop parameters.</em><ul>
+     * <li><b>If at least one init function is given,</b><ol type="a">
+     *   <li>Examine init function parameter lists.
+     *   <li>Omitted init functions are deemed to have {@code null} parameter lists.
+     *   <li>All init function parameter lists must be effectively identical.
+     *   <li>The longest parameter list (which is necessarily unique) is called the "common suffix".
      * </ol>
+     * <li><b>If no init function is given,</b><ol type="a">
+     *   <li>Examine the suffixes of the step, pred, and fini parameter lists, after removing the "common prefix".
+     *   <li>The longest of these suffixes is taken as the "common suffix".
+     * </ol></ul>
      * <p>
      * <em>Step 1C: Determine loop return type.</em><ol type="a">
      * <li>Examine fini function return types, disregarding omitted fini functions.
@@ -3286,9 +3291,6 @@
      * <li>Every non-omitted pred function must have a {@code boolean} return type.
      * </ol>
      * <p>
-     * (Implementation Note: Steps 1A, 1B, 1C, 1D are logically independent of each other, and may be performed in any
-     * order.)
-     * <p>
      * <em>Step 2: Determine parameter lists.</em><ol type="a">
      * <li>The parameter list for the resulting loop handle will be the "common suffix".
      * <li>The parameter list for init functions will be adjusted to the "common suffix". (Note that their parameter
@@ -3375,10 +3377,10 @@
      * <blockquote><pre>{@code
      * // iterative implementation of the factorial function as a loop handle
      * static int one(int k) { return 1; }
-     * int inc(int i, int acc, int k) { return i + 1; }
-     * int mult(int i, int acc, int k) { return i * acc; }
-     * boolean pred(int i, int acc, int k) { return i < k; }
-     * int fin(int i, int acc, int k) { return acc; }
+     * static int inc(int i, int acc, int k) { return i + 1; }
+     * static int mult(int i, int acc, int k) { return i * acc; }
+     * static boolean pred(int i, int acc, int k) { return i < k; }
+     * static int fin(int i, int acc, int k) { return acc; }
      * // assume MH_one, MH_inc, MH_mult, MH_pred, and MH_fin are handles to the above methods
      * // null initializer for counter, should initialize to 0
      * MethodHandle[] counterClause = new MethodHandle[]{null, MH_inc};
@@ -3436,9 +3438,7 @@
                 collect(Collectors.toList());
 
         // Step 1B: determine loop parameters.
-        final List<Class<?>> empty = new ArrayList<>();
-        final List<Class<?>> commonSuffix = init.stream().filter(Objects::nonNull).map(MethodHandle::type).
-                map(MethodType::parameterList).reduce((p, q) -> p.size() >= q.size() ? p : q).orElse(empty);
+        final List<Class<?>> commonSuffix = buildCommonSuffix(init, step, pred, fini, commonPrefix.size());
         checkLoop1b(init, commonSuffix);
 
         // Step 1C: determine loop return type.
@@ -3520,15 +3520,15 @@
      * @apiNote Example:
      * <blockquote><pre>{@code
      * // implement the zip function for lists as a loop handle
-     * List<String> initZip(Iterator<String> a, Iterator<String> b) { return new ArrayList<>(); }
-     * boolean zipPred(List<String> zip, Iterator<String> a, Iterator<String> b) { return a.hasNext() && b.hasNext(); }
-     * List<String> zipStep(List<String> zip, Iterator<String> a, Iterator<String> b) {
+     * static List<String> initZip(Iterator<String> a, Iterator<String> b) { return new ArrayList<>(); }
+     * static boolean zipPred(List<String> zip, Iterator<String> a, Iterator<String> b) { return a.hasNext() && b.hasNext(); }
+     * static List<String> zipStep(List<String> zip, Iterator<String> a, Iterator<String> b) {
      *   zip.add(a.next());
      *   zip.add(b.next());
      *   return zip;
      * }
      * // assume MH_initZip, MH_zipPred, and MH_zipStep are handles to the above methods
-     * MethodHandle loop = MethodHandles.doWhileLoop(MH_initZip, MH_zipStep, MH_zipPred);
+     * MethodHandle loop = MethodHandles.whileLoop(MH_initZip, MH_zipPred, MH_zipStep);
      * List<String> a = Arrays.asList("a", "b", "c", "d");
      * List<String> b = Arrays.asList("e", "f", "g", "h");
      * List<String> zipped = Arrays.asList("a", "e", "b", "f", "c", "g", "d", "h");
@@ -3594,9 +3594,9 @@
      * @apiNote Example:
      * <blockquote><pre>{@code
      * // int i = 0; while (i < limit) { ++i; } return i; => limit
-     * int zero(int limit) { return 0; }
-     * int step(int i, int limit) { return i + 1; }
-     * boolean pred(int i, int limit) { return i < limit; }
+     * static int zero(int limit) { return 0; }
+     * static int step(int i, int limit) { return i + 1; }
+     * static boolean pred(int i, int limit) { return i < limit; }
      * // assume MH_zero, MH_step, and MH_pred are handles to the above methods
      * MethodHandle loop = MethodHandles.doWhileLoop(MH_zero, MH_step, MH_pred);
      * assertEquals(23, loop.invoke(23));
@@ -3664,8 +3664,8 @@
      * <blockquote><pre>{@code
      * // String s = "Lambdaman!"; for (int i = 0; i < 13; ++i) { s = "na " + s; } return s;
      * // => a variation on a well known theme
-     * String start(String arg) { return arg; }
-     * String step(int counter, String v, String arg) { return "na " + v; }
+     * static String start(String arg) { return arg; }
+     * static String step(int counter, String v, String arg) { return "na " + v; }
      * // assume MH_start and MH_step are handles to the two methods above
      * MethodHandle fit13 = MethodHandles.constant(int.class, 13);
      * MethodHandle loop = MethodHandles.countedLoop(fit13, MH_start, MH_step);
@@ -3808,11 +3808,11 @@
      * @apiNote Example:
      * <blockquote><pre>{@code
      * // reverse a list
-     * List<String> reverseStep(String e, List<String> r, List<String> l) {
+     * static List<String> reverseStep(String e, List<String> r, List<String> l) {
      *   r.add(0, e);
      *   return r;
      * }
-     * List<String> newArrayList(List<String> l) { return new ArrayList<>(); }
+     * static List<String> newArrayList(List<String> l) { return new ArrayList<>(); }
      * // assume MH_reverseStep, MH_newArrayList are handles to the above methods
      * MethodHandle loop = MethodHandles.iteratedLoop(null, MH_newArrayList, MH_reverseStep);
      * List<String> list = Arrays.asList("a", "b", "c", "d", "e");
@@ -4084,6 +4084,21 @@
         }
     }
 
+    private static List<Class<?>> buildCommonSuffix(List<MethodHandle> init, List<MethodHandle> step, List<MethodHandle> pred, List<MethodHandle> fini, int cpSize) {
+        final List<Class<?>> empty = List.of();
+        final List<MethodHandle> nonNullInits = init.stream().filter(Objects::nonNull).collect(Collectors.toList());
+        if (nonNullInits.isEmpty()) {
+            final List<Class<?>> longest = Stream.of(step, pred, fini).flatMap(List::stream).filter(Objects::nonNull).
+                    // take only those that can contribute to a common suffix because they are longer than the prefix
+                    map(MethodHandle::type).filter(t -> t.parameterCount() > cpSize).map(MethodType::parameterList).
+                    reduce((p, q) -> p.size() >= q.size() ? p : q).orElse(empty);
+            return longest.size() == 0 ? empty : longest.subList(cpSize, longest.size());
+        } else {
+            return nonNullInits.stream().map(MethodHandle::type).map(MethodType::parameterList).
+                    reduce((p, q) -> p.size() >= q.size() ? p : q).get();
+        }
+    }
+
     private static void checkLoop1b(List<MethodHandle> init, List<Class<?>> commonSuffix) {
         if (init.stream().filter(Objects::nonNull).map(MethodHandle::type).map(MethodType::parameterList).
                 anyMatch(pl -> !pl.equals(commonSuffix.subList(0, pl.size())))) {
@@ -4109,8 +4124,10 @@
     }
 
     private static void checkLoop2(List<MethodHandle> step, List<MethodHandle> pred, List<MethodHandle> fini, List<Class<?>> commonParameterSequence) {
+        final int cpSize = commonParameterSequence.size();
         if (Stream.of(step, pred, fini).flatMap(List::stream).filter(Objects::nonNull).map(MethodHandle::type).
-                map(MethodType::parameterList).anyMatch(pl -> !pl.equals(commonParameterSequence.subList(0, pl.size())))) {
+                map(MethodType::parameterList).
+                anyMatch(pl -> pl.size() > cpSize || !pl.equals(commonParameterSequence.subList(0, pl.size())))) {
             throw newIllegalArgumentException("found non-effectively identical parameter type lists:\nstep: " + step +
                     "\npred: " + pred + "\nfini: " + fini + " (common parameter sequence: " + commonParameterSequence + ")");
         }
--- a/jdk/src/java.base/share/classes/java/net/DatagramSocketImpl.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/net/DatagramSocketImpl.java	Mon Mar 07 16:38:23 2016 -0800
@@ -27,9 +27,7 @@
 
 import java.io.FileDescriptor;
 import java.io.IOException;
-import java.io.InterruptedIOException;
 import java.util.Set;
-import java.util.HashSet;
 
 /**
  * Abstract datagram and multicast socket implementation base class.
@@ -352,32 +350,32 @@
         }
     }
 
-    private static final  Set<SocketOption<?>> dgSocketOptions =
-        new HashSet<>();
+    private static final Set<SocketOption<?>> dgSocketOptions;
 
-    private static final  Set<SocketOption<?>> mcSocketOptions =
-        new HashSet<>();
+    private static final Set<SocketOption<?>> mcSocketOptions;
 
     static {
-        dgSocketOptions.add(StandardSocketOptions.SO_SNDBUF);
-        dgSocketOptions.add(StandardSocketOptions.SO_RCVBUF);
-        dgSocketOptions.add(StandardSocketOptions.SO_REUSEADDR);
-        dgSocketOptions.add(StandardSocketOptions.IP_TOS);
+        dgSocketOptions = Set.of(StandardSocketOptions.SO_SNDBUF,
+                                 StandardSocketOptions.SO_RCVBUF,
+                                 StandardSocketOptions.SO_REUSEADDR,
+                                 StandardSocketOptions.IP_TOS);
 
-        mcSocketOptions.add(StandardSocketOptions.SO_SNDBUF);
-        mcSocketOptions.add(StandardSocketOptions.SO_RCVBUF);
-        mcSocketOptions.add(StandardSocketOptions.SO_REUSEADDR);
-        mcSocketOptions.add(StandardSocketOptions.IP_TOS);
-        mcSocketOptions.add(StandardSocketOptions.IP_MULTICAST_IF);
-        mcSocketOptions.add(StandardSocketOptions.IP_MULTICAST_TTL);
-        mcSocketOptions.add(StandardSocketOptions.IP_MULTICAST_LOOP);
-    };
+        mcSocketOptions = Set.of(StandardSocketOptions.SO_SNDBUF,
+                                 StandardSocketOptions.SO_RCVBUF,
+                                 StandardSocketOptions.SO_REUSEADDR,
+                                 StandardSocketOptions.IP_TOS,
+                                 StandardSocketOptions.IP_MULTICAST_IF,
+                                 StandardSocketOptions.IP_MULTICAST_TTL,
+                                 StandardSocketOptions.IP_MULTICAST_LOOP);
+    }
 
     /**
      * Returns a set of SocketOptions supported by this impl
      * and by this impl's socket (DatagramSocket or MulticastSocket)
      *
      * @return a Set of SocketOptions
+     *
+     * @since 9
      */
     protected Set<SocketOption<?>> supportedOptions() {
         if (getDatagramSocket() instanceof MulticastSocket) {
--- a/jdk/src/java.base/share/classes/java/net/SocketImpl.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/net/SocketImpl.java	Mon Mar 07 16:38:23 2016 -0800
@@ -30,8 +30,6 @@
 import java.io.OutputStream;
 import java.io.FileDescriptor;
 import java.util.Set;
-import java.util.HashSet;
-import java.util.Collections;
 
 /**
  * The abstract class {@code SocketImpl} is a common superclass
@@ -445,31 +443,31 @@
         }
     }
 
-    private static final  Set<SocketOption<?>> socketOptions =
-        new HashSet<>();
+    private static final Set<SocketOption<?>> socketOptions;
 
-    private static final  Set<SocketOption<?>> serverSocketOptions =
-        new HashSet<>();
+    private static final Set<SocketOption<?>> serverSocketOptions;
 
     static {
-        socketOptions.add(StandardSocketOptions.SO_KEEPALIVE);
-        socketOptions.add(StandardSocketOptions.SO_SNDBUF);
-        socketOptions.add(StandardSocketOptions.SO_RCVBUF);
-        socketOptions.add(StandardSocketOptions.SO_REUSEADDR);
-        socketOptions.add(StandardSocketOptions.SO_LINGER);
-        socketOptions.add(StandardSocketOptions.IP_TOS);
-        socketOptions.add(StandardSocketOptions.TCP_NODELAY);
+        socketOptions = Set.of(StandardSocketOptions.SO_KEEPALIVE,
+                               StandardSocketOptions.SO_SNDBUF,
+                               StandardSocketOptions.SO_RCVBUF,
+                               StandardSocketOptions.SO_REUSEADDR,
+                               StandardSocketOptions.SO_LINGER,
+                               StandardSocketOptions.IP_TOS,
+                               StandardSocketOptions.TCP_NODELAY);
 
-        serverSocketOptions.add(StandardSocketOptions.SO_RCVBUF);
-        serverSocketOptions.add(StandardSocketOptions.SO_REUSEADDR);
-        serverSocketOptions.add(StandardSocketOptions.IP_TOS);
-    };
+        serverSocketOptions = Set.of(StandardSocketOptions.SO_RCVBUF,
+                                     StandardSocketOptions.SO_REUSEADDR,
+                                     StandardSocketOptions.IP_TOS);
+    }
 
     /**
      * Returns a set of SocketOptions supported by this impl
      * and by this impl's socket (Socket or ServerSocket)
      *
      * @return a Set of SocketOptions
+     *
+     * @since 9
      */
     protected Set<SocketOption<?>> supportedOptions() {
         if (getSocket() != null) {
--- a/jdk/src/java.base/share/classes/java/nio/Bits.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/nio/Bits.java	Mon Mar 07 16:38:23 2016 -0800
@@ -736,202 +736,9 @@
         });
     }
 
-    // -- Bulk get/put acceleration --
-
     // These numbers represent the point at which we have empirically
     // determined that the average cost of a JNI call exceeds the expense
     // of an element by element copy.  These numbers may change over time.
     static final int JNI_COPY_TO_ARRAY_THRESHOLD   = 6;
     static final int JNI_COPY_FROM_ARRAY_THRESHOLD = 6;
-
-    // This number limits the number of bytes to copy per call to Unsafe's
-    // copyMemory method. A limit is imposed to allow for safepoint polling
-    // during a large copy
-    static final long UNSAFE_COPY_THRESHOLD = 1024L * 1024L;
-
-    // These methods do no bounds checking.  Verification that the copy will not
-    // result in memory corruption should be done prior to invocation.
-    // All positions and lengths are specified in bytes.
-
-    /**
-     * Copy from given source array to destination address.
-     *
-     * @param   src
-     *          source array
-     * @param   srcBaseOffset
-     *          offset of first element of storage in source array
-     * @param   srcPos
-     *          offset within source array of the first element to read
-     * @param   dstAddr
-     *          destination address
-     * @param   length
-     *          number of bytes to copy
-     */
-    static void copyFromArray(Object src, long srcBaseOffset, long srcPos,
-                              long dstAddr, long length)
-    {
-        long offset = srcBaseOffset + srcPos;
-        while (length > 0) {
-            long size = (length > UNSAFE_COPY_THRESHOLD) ? UNSAFE_COPY_THRESHOLD : length;
-            unsafe.copyMemory(src, offset, null, dstAddr, size);
-            length -= size;
-            offset += size;
-            dstAddr += size;
-        }
-    }
-
-    /**
-     * Copy from source address into given destination array.
-     *
-     * @param   srcAddr
-     *          source address
-     * @param   dst
-     *          destination array
-     * @param   dstBaseOffset
-     *          offset of first element of storage in destination array
-     * @param   dstPos
-     *          offset within destination array of the first element to write
-     * @param   length
-     *          number of bytes to copy
-     */
-    static void copyToArray(long srcAddr, Object dst, long dstBaseOffset, long dstPos,
-                            long length)
-    {
-        long offset = dstBaseOffset + dstPos;
-        while (length > 0) {
-            long size = (length > UNSAFE_COPY_THRESHOLD) ? UNSAFE_COPY_THRESHOLD : length;
-            unsafe.copyMemory(null, srcAddr, dst, offset, size);
-            length -= size;
-            srcAddr += size;
-            offset += size;
-        }
-    }
-
-    /**
-     * Copy and unconditionally byte swap 16 bit elements from a heap array to off-heap memory
-     *
-     * @param src
-     *        the source array, must be a 16-bit primitive array type
-     * @param srcPos
-     *        byte offset within source array of the first element to read
-     * @param dstAddr
-     *        destination address
-     * @param length
-     *        number of bytes to copy
-     */
-    static void copyFromCharArray(Object src, long srcPos, long dstAddr, long length) {
-        unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 2);
-    }
-
-    /**
-     * Copy and unconditionally byte swap 16 bit elements from off-heap memory to a heap array
-     *
-     * @param srcAddr
-     *        source address
-     * @param dst
-     *        destination array, must be a 16-bit primitive array type
-     * @param dstPos
-     *        byte offset within the destination array of the first element to write
-     * @param length
-     *        number of bytes to copy
-     */
-    static void copyToCharArray(long srcAddr, Object dst, long dstPos, long length) {
-        unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 2);
-    }
-
-    /**
-     * Copy and unconditionally byte swap 16 bit elements from a heap array to off-heap memory
-     *
-     * @param src
-     *        the source array, must be a 16-bit primitive array type
-     * @param srcPos
-     *        byte offset within source array of the first element to read
-     * @param dstAddr
-     *        destination address
-     * @param length
-     *        number of bytes to copy
-     */
-    static void copyFromShortArray(Object src, long srcPos, long dstAddr, long length) {
-        unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 2);
-    }
-
-    /**
-     * Copy and unconditionally byte swap 16 bit elements from off-heap memory to a heap array
-     *
-     * @param srcAddr
-     *        source address
-     * @param dst
-     *        destination array, must be a 16-bit primitive array type
-     * @param dstPos
-     *        byte offset within the destination array of the first element to write
-     * @param length
-     *        number of bytes to copy
-     */
-    static void copyToShortArray(long srcAddr, Object dst, long dstPos, long length) {
-        unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 2);
-    }
-
-    /**
-     * Copy and unconditionally byte swap 32 bit elements from a heap array to off-heap memory
-     *
-     * @param src
-     *        the source array, must be a 32-bit primitive array type
-     * @param srcPos
-     *        byte offset within source array of the first element to read
-     * @param dstAddr
-     *        destination address
-     * @param length
-     *        number of bytes to copy
-     */
-    static void copyFromIntArray(Object src, long srcPos, long dstAddr, long length) {
-        unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 4);
-    }
-
-    /**
-     * Copy and unconditionally byte swap 32 bit elements from off-heap memory to a heap array
-     *
-     * @param srcAddr
-     *        source address
-     * @param dst
-     *        destination array, must be a 32-bit primitive array type
-     * @param dstPos
-     *        byte offset within the destination array of the first element to write
-     * @param length
-     *        number of bytes to copy
-     */
-    static void copyToIntArray(long srcAddr, Object dst, long dstPos, long length) {
-        unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 4);
-    }
-
-    /**
-     * Copy and unconditionally byte swap 64 bit elements from a heap array to off-heap memory
-     *
-     * @param src
-     *        the source array, must be a 64-bit primitive array type
-     * @param srcPos
-     *        byte offset within source array of the first element to read
-     * @param dstAddr
-     *        destination address
-     * @param length
-     *        number of bytes to copy
-     */
-    static void copyFromLongArray(Object src, long srcPos, long dstAddr, long length) {
-        unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 8);
-    }
-
-    /**
-     * Copy and unconditionally byte swap 64 bit elements from off-heap memory to a heap array
-     *
-     * @param srcAddr
-     *        source address
-     * @param dst
-     *        destination array, must be a 64-bit primitive array type
-     * @param dstPos
-     *        byte offset within the destination array of the first element to write
-     * @param length
-     *        number of bytes to copy
-     */
-    static void copyToLongArray(long srcAddr, Object dst, long dstPos, long length) {
-        unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 8);
-    }
 }
--- a/jdk/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template	Mon Mar 07 16:38:23 2016 -0800
@@ -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.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -270,16 +270,22 @@
             if (length > rem)
                 throw new BufferUnderflowException();
 
+            long dstOffset = arrayBaseOffset + ((long)offset << $LG_BYTES_PER_VALUE$);
 #if[!byte]
             if (order() != ByteOrder.nativeOrder())
-                Bits.copyTo$Memtype$Array(ix(pos), dst,
-                                          (long)offset << $LG_BYTES_PER_VALUE$,
-                                          (long)length << $LG_BYTES_PER_VALUE$);
+                unsafe.copySwapMemory(null,
+                                      ix(pos),
+                                      dst,
+                                      dstOffset,
+                                      (long)length << $LG_BYTES_PER_VALUE$,
+                                      (long)1 << $LG_BYTES_PER_VALUE$);
             else
 #end[!byte]
-                Bits.copyToArray(ix(pos), dst, arrayBaseOffset,
-                                 (long)offset << $LG_BYTES_PER_VALUE$,
-                                 (long)length << $LG_BYTES_PER_VALUE$);
+                unsafe.copyMemory(null,
+                                  ix(pos),
+                                  dst,
+                                  dstOffset,
+                                  (long)length << $LG_BYTES_PER_VALUE$);
             position(pos + length);
         } else {
             super.get(dst, offset, length);
@@ -362,18 +368,22 @@
             if (length > rem)
                 throw new BufferOverflowException();
 
+            long srcOffset = arrayBaseOffset + ((long)offset << $LG_BYTES_PER_VALUE$);
 #if[!byte]
             if (order() != ByteOrder.nativeOrder())
-                Bits.copyFrom$Memtype$Array(src,
-                                            (long)offset << $LG_BYTES_PER_VALUE$,
-                                            ix(pos),
-                                            (long)length << $LG_BYTES_PER_VALUE$);
+                unsafe.copySwapMemory(src,
+                                      srcOffset,
+                                      null,
+                                      ix(pos),
+                                      (long)length << $LG_BYTES_PER_VALUE$,
+                                      (long)1 << $LG_BYTES_PER_VALUE$);
             else
 #end[!byte]
-                Bits.copyFromArray(src, arrayBaseOffset,
-                                   (long)offset << $LG_BYTES_PER_VALUE$,
-                                   ix(pos),
-                                   (long)length << $LG_BYTES_PER_VALUE$);
+                unsafe.copyMemory(src,
+                                  srcOffset,
+                                  null,
+                                  ix(pos),
+                                  (long)length << $LG_BYTES_PER_VALUE$);
             position(pos + length);
         } else {
             super.put(src, offset, length);
--- a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -71,7 +71,7 @@
  * associated with each of the keys.
  *
  * <p>If the algorithm is the <i>DSA</i> algorithm, and the keysize (modulus
- * size) is 512, 768, or 1024, then the <i>Sun</i> provider uses a set of
+ * size) is 512, 768, 1024, or 2048, then the <i>Sun</i> provider uses a set of
  * precomputed values for the {@code p}, {@code q}, and
  * {@code g} parameters. If the modulus size is not one of the above
  * values, the <i>Sun</i> provider creates a new set of parameters. Other
@@ -96,7 +96,7 @@
  * (via a call to an {@code initialize} method), each provider must
  * supply (and document) a default initialization.
  * For example, the <i>Sun</i> provider uses a default modulus size (keysize)
- * of 1024 bits.
+ * of 1024 bits for DSA key pairs.
  *
  * <p>Note that this class is abstract and extends from
  * {@code KeyPairGeneratorSpi} for historical reasons.
--- a/jdk/src/java.base/share/classes/java/util/SplittableRandom.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/SplittableRandom.java	Mon Mar 07 16:38:23 2016 -0800
@@ -219,12 +219,20 @@
         return seed += gamma;
     }
 
+    // IllegalArgumentException messages
+    static final String BAD_BOUND = "bound must be positive";
+    static final String BAD_RANGE = "bound must be greater than origin";
+    static final String BAD_SIZE  = "size must be non-negative";
+
     /**
      * The seed generator for default constructors.
      */
-    private static final AtomicLong defaultGen = new AtomicLong(initialSeed());
+    private static final AtomicLong defaultGen
+        = new AtomicLong(mix64(System.currentTimeMillis()) ^
+                         mix64(System.nanoTime()));
 
-    private static long initialSeed() {
+    // at end of <clinit> to survive static initialization circularity
+    static {
         if (java.security.AccessController.doPrivileged(
             new java.security.PrivilegedAction<Boolean>() {
                 public Boolean run() {
@@ -234,17 +242,10 @@
             long s = (long)seedBytes[0] & 0xffL;
             for (int i = 1; i < 8; ++i)
                 s = (s << 8) | ((long)seedBytes[i] & 0xffL);
-            return s;
+            defaultGen.set(s);
         }
-        return (mix64(System.currentTimeMillis()) ^
-                mix64(System.nanoTime()));
     }
 
-    // IllegalArgumentException messages
-    static final String BAD_BOUND = "bound must be positive";
-    static final String BAD_RANGE = "bound must be greater than origin";
-    static final String BAD_SIZE  = "size must be non-negative";
-
     /*
      * Internal versions of nextX methods used by streams, as well as
      * the public nextX(origin, bound) methods.  These exist mainly to
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Mon Mar 07 16:38:23 2016 -0800
@@ -125,53 +125,6 @@
      * but we provide identical statistical properties.
      */
 
-    /** Generates per-thread initialization/probe field */
-    private static final AtomicInteger probeGenerator = new AtomicInteger();
-
-    /**
-     * The next seed for default constructors.
-     */
-    private static final AtomicLong seeder = new AtomicLong(initialSeed());
-
-    private static long initialSeed() {
-        if (java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Boolean>() {
-                public Boolean run() {
-                    return Boolean.getBoolean("java.util.secureRandomSeed");
-                }})) {
-            byte[] seedBytes = java.security.SecureRandom.getSeed(8);
-            long s = (long)seedBytes[0] & 0xffL;
-            for (int i = 1; i < 8; ++i)
-                s = (s << 8) | ((long)seedBytes[i] & 0xffL);
-            return s;
-        }
-        return (mix64(System.currentTimeMillis()) ^
-                mix64(System.nanoTime()));
-    }
-
-    /**
-     * The seed increment.
-     */
-    private static final long GAMMA = 0x9e3779b97f4a7c15L;
-
-    /**
-     * The increment for generating probe values.
-     */
-    private static final int PROBE_INCREMENT = 0x9e3779b9;
-
-    /**
-     * The increment of seeder per new instance.
-     */
-    private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL;
-
-    // Constants from SplittableRandom
-    private static final double DOUBLE_UNIT = 0x1.0p-53;  // 1.0  / (1L << 53)
-    private static final float  FLOAT_UNIT  = 0x1.0p-24f; // 1.0f / (1 << 24)
-
-    /** Rarely-used holder for the second of a pair of Gaussians */
-    private static final ThreadLocal<Double> nextLocalGaussian =
-        new ThreadLocal<>();
-
     private static long mix64(long z) {
         z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
         z = (z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L;
@@ -194,9 +147,6 @@
         initialized = true; // false during super() call
     }
 
-    /** The common ThreadLocalRandom */
-    static final ThreadLocalRandom instance = new ThreadLocalRandom();
-
     /**
      * Initialize Thread fields for the current thread.  Called only
      * when Thread.threadLocalRandomProbe is zero, indicating that a
@@ -248,11 +198,6 @@
         return (int)(mix64(nextSeed()) >>> (64 - bits));
     }
 
-    // IllegalArgumentException messages
-    static final String BAD_BOUND = "bound must be positive";
-    static final String BAD_RANGE = "bound must be greater than origin";
-    static final String BAD_SIZE  = "size must be non-negative";
-
     /**
      * The form of nextLong used by LongStream Spliterators.  If
      * origin is greater than bound, acts as unbounded form of
@@ -1050,6 +995,32 @@
         return current();
     }
 
+    // Static initialization
+
+    /**
+     * The seed increment.
+     */
+    private static final long GAMMA = 0x9e3779b97f4a7c15L;
+
+    /**
+     * The increment for generating probe values.
+     */
+    private static final int PROBE_INCREMENT = 0x9e3779b9;
+
+    /**
+     * The increment of seeder per new instance.
+     */
+    private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL;
+
+    // Constants from SplittableRandom
+    private static final double DOUBLE_UNIT = 0x1.0p-53;  // 1.0  / (1L << 53)
+    private static final float  FLOAT_UNIT  = 0x1.0p-24f; // 1.0f / (1 << 24)
+
+    // IllegalArgumentException messages
+    static final String BAD_BOUND = "bound must be positive";
+    static final String BAD_RANGE = "bound must be greater than origin";
+    static final String BAD_SIZE  = "size must be non-negative";
+
     // Unsafe mechanics
     private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
     private static final long SEED;
@@ -1067,4 +1038,36 @@
             throw new Error(e);
         }
     }
+
+    /** Rarely-used holder for the second of a pair of Gaussians */
+    private static final ThreadLocal<Double> nextLocalGaussian =
+        new ThreadLocal<>();
+
+    /** Generates per-thread initialization/probe field */
+    private static final AtomicInteger probeGenerator = new AtomicInteger();
+
+    /** The common ThreadLocalRandom */
+    static final ThreadLocalRandom instance = new ThreadLocalRandom();
+
+    /**
+     * The next seed for default constructors.
+     */
+    private static final AtomicLong seeder
+        = new AtomicLong(mix64(System.currentTimeMillis()) ^
+                         mix64(System.nanoTime()));
+
+    // at end of <clinit> to survive static initialization circularity
+    static {
+        if (java.security.AccessController.doPrivileged(
+            new java.security.PrivilegedAction<Boolean>() {
+                public Boolean run() {
+                    return Boolean.getBoolean("java.util.secureRandomSeed");
+                }})) {
+            byte[] seedBytes = java.security.SecureRandom.getSeed(8);
+            long s = (long)seedBytes[0] & 0xffL;
+            for (int i = 1; i < 8; ++i)
+                s = (s << 8) | ((long)seedBytes[i] & 0xffL);
+            seeder.set(s);
+        }
+    }
 }
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Mon Mar 07 16:38:23 2016 -0800
@@ -158,7 +158,7 @@
         RUNTIME_VERSION = AccessController.doPrivileged(
                 new PrivilegedAction<Integer>() {
                     public Integer run() {
-                        Integer v = sun.misc.Version.jdkMajorVersion(); // fixme when JEP 223 Version integrated
+                        Integer v = jdk.Version.current().major();
                         Integer i = Integer.getInteger("jdk.util.jar.version", v);
                         i = i < 0 ? 0 : i;
                         return i > v ? v : i;
@@ -359,7 +359,7 @@
     }
 
     private boolean runtimeVersionExists() {
-        int version = sun.misc.Version.jdkMajorVersion();  // fixme when JEP 223 integrated
+        int version = jdk.Version.current().major();
         try {
             Release.valueOf(version);
             return true;
@@ -893,11 +893,15 @@
     }
 
     private JarEntry verifiableEntry(ZipEntry ze) {
-        if (!(ze instanceof JarFileEntry)) {
-            ze = getJarEntry(ze.getName());
+        if (ze instanceof JarFileEntry) {
+            // assure the name and entry match for verification
+            return ((JarFileEntry)ze).reifiedEntry();
         }
-        // assure the name and entry match for verification
-        return ze == null ? null : ((JarFileEntry)ze).reifiedEntry();
+        ze = getJarEntry(ze.getName());
+        if (ze instanceof JarFileEntry) {
+            return ((JarFileEntry)ze).reifiedEntry();
+        }
+        return (JarEntry)ze;
     }
 
     // Statics for hand-coded Boyer-Moore search
--- a/jdk/src/java.base/share/classes/java/util/stream/AbstractPipeline.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/AbstractPipeline.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -327,6 +327,8 @@
     @Override
     @SuppressWarnings("unchecked")
     public S onClose(Runnable closeHandler) {
+        if (linkedOrConsumed)
+            throw new IllegalStateException(MSG_STREAM_LINKED);
         Objects.requireNonNull(closeHandler);
         Runnable existingHandler = sourceStage.sourceCloseAction;
         sourceStage.sourceCloseAction =
--- a/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -949,24 +949,100 @@
      */
     public static DoubleStream iterate(final double seed, final DoubleUnaryOperator f) {
         Objects.requireNonNull(f);
-        final PrimitiveIterator.OfDouble iterator = new PrimitiveIterator.OfDouble() {
-            double t = seed;
+        Spliterator.OfDouble spliterator = new Spliterators.AbstractDoubleSpliterator(Long.MAX_VALUE,
+               Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
+            double prev;
+            boolean started;
 
             @Override
-            public boolean hasNext() {
+            public boolean tryAdvance(DoubleConsumer action) {
+                Objects.requireNonNull(action);
+                double t;
+                if (started)
+                    t = f.applyAsDouble(prev);
+                else {
+                    t = seed;
+                    started = true;
+                }
+                action.accept(prev = t);
+                return true;
+            }
+        };
+        return StreamSupport.doubleStream(spliterator, false);
+    }
+
+    /**
+     * Returns a sequential ordered {@code DoubleStream} produced by iterative
+     * application of a function to an initial element, conditioned on
+     * satisfying the supplied predicate.  The stream terminates as soon as
+     * the predicate returns false.
+     *
+     * <p>
+     * {@code DoubleStream.iterate} should produce the same sequence of
+     * elements as produced by the corresponding for-loop:
+     * <pre>{@code
+     *     for (double index=seed; predicate.test(index); index = f.apply(index)) {
+     *         ...
+     *     }
+     * }</pre>
+     *
+     * <p>
+     * The resulting sequence may be empty if the predicate does not hold on
+     * the seed value.  Otherwise the first element will be the supplied seed
+     * value, the next element (if present) will be the result of applying the
+     * function f to the seed value, and so on iteratively until the predicate
+     * indicates that the stream should terminate.
+     *
+     * @param seed the initial element
+     * @param predicate a predicate to apply to elements to determine when the
+     *          stream must terminate.
+     * @param f a function to be applied to the previous element to produce
+     *          a new element
+     * @return a new sequential {@code DoubleStream}
+     * @since 9
+     */
+    public static DoubleStream iterate(double seed, DoublePredicate predicate, DoubleUnaryOperator f) {
+        Objects.requireNonNull(f);
+        Objects.requireNonNull(predicate);
+        Spliterator.OfDouble spliterator = new Spliterators.AbstractDoubleSpliterator(Long.MAX_VALUE,
+               Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
+            double prev;
+            boolean started, finished;
+
+            @Override
+            public boolean tryAdvance(DoubleConsumer action) {
+                Objects.requireNonNull(action);
+                if (finished)
+                    return false;
+                double t;
+                if (started)
+                    t = f.applyAsDouble(prev);
+                else {
+                    t = seed;
+                    started = true;
+                }
+                if (!predicate.test(t)) {
+                    finished = true;
+                    return false;
+                }
+                action.accept(prev = t);
                 return true;
             }
 
             @Override
-            public double nextDouble() {
-                double v = t;
-                t = f.applyAsDouble(t);
-                return v;
+            public void forEachRemaining(DoubleConsumer action) {
+                Objects.requireNonNull(action);
+                if (finished)
+                    return;
+                finished = true;
+                double t = started ? f.applyAsDouble(prev) : seed;
+                while (predicate.test(t)) {
+                    action.accept(t);
+                    t = f.applyAsDouble(t);
+                }
             }
         };
-        return StreamSupport.doubleStream(Spliterators.spliteratorUnknownSize(
-                iterator,
-                Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL), false);
+        return StreamSupport.doubleStream(spliterator, false);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/stream/IntStream.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/IntStream.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -885,28 +885,104 @@
      * @param seed the initial element
      * @param f a function to be applied to the previous element to produce
      *          a new element
-     * @return A new sequential {@code IntStream}
+     * @return a new sequential {@code IntStream}
      */
     public static IntStream iterate(final int seed, final IntUnaryOperator f) {
         Objects.requireNonNull(f);
-        final PrimitiveIterator.OfInt iterator = new PrimitiveIterator.OfInt() {
-            int t = seed;
+        Spliterator.OfInt spliterator = new Spliterators.AbstractIntSpliterator(Long.MAX_VALUE,
+               Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
+            int prev;
+            boolean started;
 
             @Override
-            public boolean hasNext() {
+            public boolean tryAdvance(IntConsumer action) {
+                Objects.requireNonNull(action);
+                int t;
+                if (started)
+                    t = f.applyAsInt(prev);
+                else {
+                    t = seed;
+                    started = true;
+                }
+                action.accept(prev = t);
+                return true;
+            }
+        };
+        return StreamSupport.intStream(spliterator, false);
+    }
+
+    /**
+     * Returns a sequential ordered {@code IntStream} produced by iterative
+     * application of a function to an initial element, conditioned on
+     * satisfying the supplied predicate.  The stream terminates as soon as
+     * the predicate returns false.
+     *
+     * <p>
+     * {@code IntStream.iterate} should produce the same sequence of elements
+     * as produced by the corresponding for-loop:
+     * <pre>{@code
+     *     for (int index=seed; predicate.test(index); index = f.apply(index)) {
+     *         ...
+     *     }
+     * }</pre>
+     *
+     * <p>
+     * The resulting sequence may be empty if the predicate does not hold on
+     * the seed value.  Otherwise the first element will be the supplied seed
+     * value, the next element (if present) will be the result of applying the
+     * function f to the seed value, and so on iteratively until the predicate
+     * indicates that the stream should terminate.
+     *
+     * @param seed the initial element
+     * @param predicate a predicate to apply to elements to determine when the
+     *          stream must terminate.
+     * @param f a function to be applied to the previous element to produce
+     *          a new element
+     * @return a new sequential {@code IntStream}
+     * @since 9
+     */
+    public static IntStream iterate(int seed, IntPredicate predicate, IntUnaryOperator f) {
+        Objects.requireNonNull(f);
+        Objects.requireNonNull(predicate);
+        Spliterator.OfInt spliterator = new Spliterators.AbstractIntSpliterator(Long.MAX_VALUE,
+               Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
+            int prev;
+            boolean started, finished;
+
+            @Override
+            public boolean tryAdvance(IntConsumer action) {
+                Objects.requireNonNull(action);
+                if (finished)
+                    return false;
+                int t;
+                if (started)
+                    t = f.applyAsInt(prev);
+                else {
+                    t = seed;
+                    started = true;
+                }
+                if (!predicate.test(t)) {
+                    finished = true;
+                    return false;
+                }
+                action.accept(prev = t);
                 return true;
             }
 
             @Override
-            public int nextInt() {
-                int v = t;
-                t = f.applyAsInt(t);
-                return v;
+            public void forEachRemaining(IntConsumer action) {
+                Objects.requireNonNull(action);
+                if (finished)
+                    return;
+                finished = true;
+                int t = started ? f.applyAsInt(prev) : seed;
+                while (predicate.test(t)) {
+                    action.accept(t);
+                    t = f.applyAsInt(t);
+                }
             }
         };
-        return StreamSupport.intStream(Spliterators.spliteratorUnknownSize(
-                iterator,
-                Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL), false);
+        return StreamSupport.intStream(spliterator, false);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/stream/LongStream.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/LongStream.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -879,24 +879,100 @@
      */
     public static LongStream iterate(final long seed, final LongUnaryOperator f) {
         Objects.requireNonNull(f);
-        final PrimitiveIterator.OfLong iterator = new PrimitiveIterator.OfLong() {
-            long t = seed;
+        Spliterator.OfLong spliterator = new Spliterators.AbstractLongSpliterator(Long.MAX_VALUE,
+               Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
+            long prev;
+            boolean started;
 
             @Override
-            public boolean hasNext() {
+            public boolean tryAdvance(LongConsumer action) {
+                Objects.requireNonNull(action);
+                long t;
+                if (started)
+                    t = f.applyAsLong(prev);
+                else {
+                    t = seed;
+                    started = true;
+                }
+                action.accept(prev = t);
+                return true;
+            }
+        };
+        return StreamSupport.longStream(spliterator, false);
+    }
+
+    /**
+     * Returns a sequential ordered {@code LongStream} produced by iterative
+     * application of a function to an initial element, conditioned on
+     * satisfying the supplied predicate.  The stream terminates as soon as
+     * the predicate returns false.
+     *
+     * <p>
+     * {@code LongStream.iterate} should produce the same sequence of elements
+     * as produced by the corresponding for-loop:
+     * <pre>{@code
+     *     for (long index=seed; predicate.test(index); index = f.apply(index)) {
+     *         ...
+     *     }
+     * }</pre>
+     *
+     * <p>
+     * The resulting sequence may be empty if the predicate does not hold on
+     * the seed value.  Otherwise the first element will be the supplied seed
+     * value, the next element (if present) will be the result of applying the
+     * function f to the seed value, and so on iteratively until the predicate
+     * indicates that the stream should terminate.
+     *
+     * @param seed the initial element
+     * @param predicate a predicate to apply to elements to determine when the
+     *          stream must terminate.
+     * @param f a function to be applied to the previous element to produce
+     *          a new element
+     * @return a new sequential {@code LongStream}
+     * @since 9
+     */
+    public static LongStream iterate(long seed, LongPredicate predicate, LongUnaryOperator f) {
+        Objects.requireNonNull(f);
+        Objects.requireNonNull(predicate);
+        Spliterator.OfLong spliterator = new Spliterators.AbstractLongSpliterator(Long.MAX_VALUE,
+               Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
+            long prev;
+            boolean started, finished;
+
+            @Override
+            public boolean tryAdvance(LongConsumer action) {
+                Objects.requireNonNull(action);
+                if (finished)
+                    return false;
+                long t;
+                if (started)
+                    t = f.applyAsLong(prev);
+                else {
+                    t = seed;
+                    started = true;
+                }
+                if (!predicate.test(t)) {
+                    finished = true;
+                    return false;
+                }
+                action.accept(prev = t);
                 return true;
             }
 
             @Override
-            public long nextLong() {
-                long v = t;
-                t = f.applyAsLong(t);
-                return v;
+            public void forEachRemaining(LongConsumer action) {
+                Objects.requireNonNull(action);
+                if (finished)
+                    return;
+                finished = true;
+                long t = started ? f.applyAsLong(prev) : seed;
+                while (predicate.test(t)) {
+                    action.accept(t);
+                    t = f.applyAsLong(t);
+                }
             }
         };
-        return StreamSupport.longStream(Spliterators.spliteratorUnknownSize(
-                iterator,
-                Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL), false);
+        return StreamSupport.longStream(spliterator, false);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/stream/Stream.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/Stream.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -29,7 +29,6 @@
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Comparator;
-import java.util.Iterator;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.Spliterator;
@@ -1185,23 +1184,103 @@
      */
     public static<T> Stream<T> iterate(final T seed, final UnaryOperator<T> f) {
         Objects.requireNonNull(f);
-        final Iterator<T> iterator = new Iterator<T>() {
-            @SuppressWarnings("unchecked")
-            T t = (T) Streams.NONE;
+        Spliterator<T> spliterator = new Spliterators.AbstractSpliterator<>(Long.MAX_VALUE,
+               Spliterator.ORDERED | Spliterator.IMMUTABLE) {
+            T prev;
+            boolean started;
 
             @Override
-            public boolean hasNext() {
+            public boolean tryAdvance(Consumer<? super T> action) {
+                Objects.requireNonNull(action);
+                T t;
+                if (started)
+                    t = f.apply(prev);
+                else {
+                    t = seed;
+                    started = true;
+                }
+                action.accept(prev = t);
+                return true;
+            }
+        };
+        return StreamSupport.stream(spliterator, false);
+    }
+
+    /**
+     * Returns a sequential ordered {@code Stream} produced by iterative
+     * application of a function to an initial element, conditioned on
+     * satisfying the supplied predicate.  The stream terminates as soon as
+     * the predicate returns false.
+     *
+     * <p>
+     * {@code Stream.iterate} should produce the same sequence of elements as
+     * produced by the corresponding for-loop:
+     * <pre>{@code
+     *     for (T index=seed; predicate.test(index); index = f.apply(index)) {
+     *         ...
+     *     }
+     * }</pre>
+     *
+     * <p>
+     * The resulting sequence may be empty if the predicate does not hold on
+     * the seed value.  Otherwise the first element will be the supplied seed
+     * value, the next element (if present) will be the result of applying the
+     * function f to the seed value, and so on iteratively until the predicate
+     * indicates that the stream should terminate.
+     *
+     * @param <T> the type of stream elements
+     * @param seed the initial element
+     * @param predicate a predicate to apply to elements to determine when the
+     *          stream must terminate.
+     * @param f a function to be applied to the previous element to produce
+     *          a new element
+     * @return a new sequential {@code Stream}
+     * @since 9
+     */
+    public static<T> Stream<T> iterate(T seed, Predicate<? super T> predicate, UnaryOperator<T> f) {
+        Objects.requireNonNull(f);
+        Objects.requireNonNull(predicate);
+        Spliterator<T> spliterator = new Spliterators.AbstractSpliterator<>(Long.MAX_VALUE,
+               Spliterator.ORDERED | Spliterator.IMMUTABLE) {
+            T prev;
+            boolean started, finished;
+
+            @Override
+            public boolean tryAdvance(Consumer<? super T> action) {
+                Objects.requireNonNull(action);
+                if (finished)
+                    return false;
+                T t;
+                if (started)
+                    t = f.apply(prev);
+                else {
+                    t = seed;
+                    started = true;
+                }
+                if (!predicate.test(t)) {
+                    prev = null;
+                    finished = true;
+                    return false;
+                }
+                action.accept(prev = t);
                 return true;
             }
 
             @Override
-            public T next() {
-                return t = (t == Streams.NONE) ? seed : f.apply(t);
+            public void forEachRemaining(Consumer<? super T> action) {
+                Objects.requireNonNull(action);
+                if (finished)
+                    return;
+                finished = true;
+                T t = started ? f.apply(prev) : seed;
+                prev = null;
+                while (predicate.test(t)) {
+                    action.accept(t);
+                    t = f.apply(t);
+                }
             }
         };
-        return StreamSupport.stream(Spliterators.spliteratorUnknownSize(
-                iterator,
-                Spliterator.ORDERED | Spliterator.IMMUTABLE), false);
+        return StreamSupport.stream(spliterator, false);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/stream/Streams.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/Streams.java	Mon Mar 07 16:38:23 2016 -0800
@@ -49,14 +49,6 @@
     }
 
     /**
-     * An object instance representing no value, that cannot be an actual
-     * data element of a stream.  Used when processing streams that can contain
-     * {@code null} elements to distinguish between a {@code null} value and no
-     * value.
-     */
-    static final Object NONE = new Object();
-
-    /**
      * An {@code int} range spliterator.
      */
     static final class RangeIntSpliterator implements Spliterator.OfInt {
--- a/jdk/src/java.base/share/classes/jdk/Version.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/jdk/Version.java	Mon Mar 07 16:38:23 2016 -0800
@@ -28,10 +28,10 @@
 import java.math.BigInteger;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.ArrayList;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Optional;
@@ -208,11 +208,10 @@
                                                + s + "'");
 
         // $VNUM is a dot-separated list of integers of arbitrary length
-        version
-            = Collections.unmodifiableList(
-                  Arrays.stream(m.group(VNUM_GROUP).split("\\."))
-                  .map(Integer::parseInt)
-                  .collect(Collectors.toList()));
+        List<Integer> list = new ArrayList<>();
+        for (String i : m.group(VNUM_GROUP).split("\\."))
+            list.add(Integer.parseInt(i));
+        version = Collections.unmodifiableList(list);
 
         pre = Optional.ofNullable(m.group(PRE_GROUP));
 
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Mon Mar 07 16:38:23 2016 -0800
@@ -118,6 +118,8 @@
     }
 
     public static JavaNetInetAddressAccess getJavaNetInetAddressAccess() {
+        if (javaNetInetAddressAccess == null)
+            unsafe.ensureClassInitialized(java.net.InetAddress.class);
         return javaNetInetAddressAccess;
     }
 
--- a/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java	Mon Mar 07 16:38:23 2016 -0800
@@ -758,9 +758,13 @@
 
             final URL url;
             try {
-                // add #runtime fragment to tell JarURLConnection to use
-                // runtime versioning if the underlying jar file is multi-release
-                url = new URL(getBaseURL(), ParseUtil.encodePath(name, false) + "#runtime");
+                if (jar.isMultiRelease()) {
+                    // add #runtime fragment to tell JarURLConnection to use
+                    // runtime versioning if the underlying jar file is multi-release
+                    url = new URL(getBaseURL(), ParseUtil.encodePath(name, false) + "#runtime");
+                } else {
+                    url = new URL(getBaseURL(), ParseUtil.encodePath(name, false));
+                }
                 if (check) {
                     URLClassPath.check(url);
                 }
--- a/jdk/src/java.base/share/classes/sun/misc/Version.java.template	Mon Mar 07 11:54:42 2016 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 1999, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-import java.io.PrintStream;
-
-public class Version {
-
-
-    private static final String launcher_name =
-        "@@LAUNCHER_NAME@@";
-
-    private static final String java_version =
-        "@@VERSION_SHORT@@";
-
-    private static final String java_runtime_name =
-        "@@RUNTIME_NAME@@";
-
-    private static final String java_runtime_version =
-        "@@VERSION_STRING@@";
-
-    static {
-        init();
-    }
-
-    public static void init() {
-        System.setProperty("java.version", java_version);
-        System.setProperty("java.runtime.version", java_runtime_version);
-        System.setProperty("java.runtime.name", java_runtime_name);
-    }
-
-    private static boolean versionsInitialized = false;
-    private static int jvm_major_version = 0;
-    private static int jvm_minor_version = 0;
-    private static int jvm_security_version = 0;
-    private static int jvm_patch_version = 0;
-    private static int jvm_build_number = 0;
-    private static int jdk_major_version = 0;
-    private static int jdk_minor_version = 0;
-    private static int jdk_security_version = 0;
-    private static int jdk_patch_version = 0;
-    private static int jdk_build_number = 0;
-
-    /**
-     * In case you were wondering this method is called by java -version.
-     * Sad that it prints to stderr; would be nicer if default printed on
-     * stdout.
-     */
-    public static void print() {
-        print(System.err);
-    }
-
-    /**
-     * This is the same as print except that it adds an extra line-feed
-     * at the end, typically used by the -showversion in the launcher
-     */
-    public static void println() {
-        print(System.err);
-        System.err.println();
-    }
-
-    /**
-     * Give a stream, it will print version info on it.
-     */
-    public static void print(PrintStream ps) {
-        boolean isHeadless = false;
-
-        /* Report that we're running headless if the property is true */
-        String headless = System.getProperty("java.awt.headless");
-        if ( (headless != null) && (headless.equalsIgnoreCase("true")) ) {
-            isHeadless = true;
-        }
-
-        /* First line: platform version. */
-        ps.println(launcher_name + " version \"" + java_version + "\"");
-
-        /* Second line: runtime version (ie, libraries). */
-
-        String jdk_debug_level = System.getProperty("jdk.debug", "release");
-        /* Debug level is not printed for "release" builds */
-        if ("release".equals(jdk_debug_level)) {
-            jdk_debug_level = "";
-        } else {
-            jdk_debug_level = jdk_debug_level + " ";
-        }
-
-        ps.print(java_runtime_name + " (" + jdk_debug_level + "build " + java_runtime_version);
-
-        if (java_runtime_name.indexOf("Embedded") != -1 && isHeadless) {
-            // embedded builds report headless state
-            ps.print(", headless");
-        }
-        ps.println(')');
-
-        /* Third line: JVM information. */
-        String java_vm_name    = System.getProperty("java.vm.name");
-        String java_vm_version = System.getProperty("java.vm.version");
-        String java_vm_info    = System.getProperty("java.vm.info");
-        ps.println(java_vm_name + " (" + jdk_debug_level + "build " + java_vm_version + ", " +
-                   java_vm_info + ")");
-    }
-
-
-    /**
-     * Returns the major version of the running JVM.
-     * @return the major version of the running JVM
-     * @since 1.6
-     */
-    public static synchronized int jvmMajorVersion() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jvm_major_version;
-    }
-
-    /**
-     * Returns the minor version of the running JVM.
-     * @return the minor version of the running JVM
-     * @since 1.6
-     */
-    public static synchronized int jvmMinorVersion() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jvm_minor_version;
-    }
-
-
-    /**
-     * Returns the security version of the running JVM.
-     * @return the security version of the running JVM
-     * @since 9
-     */
-    public static synchronized int jvmSecurityVersion() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jvm_security_version;
-    }
-
-    /**
-     * Returns the patch release version of the running JVM.
-     * @return the patch release version of the running JVM
-     * @since 9
-     */
-    public static synchronized int jvmPatchVersion() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jvm_patch_version;
-    }
-
-    /**
-     * Returns the build number of the running JVM.
-     * @return the build number of the running JVM
-     * @since 1.6
-     */
-    public static synchronized int jvmBuildNumber() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jvm_build_number;
-    }
-
-    /**
-     * Returns the major version of the running JDK.
-     * @return the major version of the running JDK
-     * @since 1.6
-     */
-    public static synchronized int jdkMajorVersion() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jdk_major_version;
-    }
-
-    /**
-     * Returns the minor version of the running JDK.
-     * @return the minor version of the running JDK
-     * @since 1.6
-     */
-    public static synchronized int jdkMinorVersion() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jdk_minor_version;
-    }
-
-    /**
-     * Returns the security version of the running JDK.
-     * @return the security version of the running JDK
-     * @since 9
-     */
-    public static synchronized int jdkSecurityVersion() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jdk_security_version;
-    }
-
-    /**
-     * Returns the patch release version of the running JDK.
-     * @return the patch release version of the running JDK
-     * @since 9
-     */
-    public static synchronized int jdkPatchVersion() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jdk_patch_version;
-    }
-
-    /**
-     * Returns the build number of the running JDK.
-     * @return the build number of the running JDK
-     * @since 1.6
-     */
-    public static synchronized int jdkBuildNumber() {
-        if (!versionsInitialized) {
-            initVersions();
-        }
-        return jdk_build_number;
-    }
-
-    private static synchronized void initVersions() {
-        if (versionsInitialized) {
-            return;
-        }
-        if (!getJvmVersionInfo()) {
-            throw new InternalError("Unable to obtain JVM version info");
-        }
-        getJdkVersionInfo();
-        versionsInitialized = true;
-    }
-
-    // Gets the JVM version info if available and sets the jvm_*_version fields
-    // and its capabilities.
-    private static native boolean getJvmVersionInfo();
-    private static native void getJdkVersionInfo();
-}
-
-// Help Emacs a little because this file doesn't end in .java.
-//
-// Local Variables: ***
-// mode: java ***
-// End: ***
--- a/jdk/src/java.base/share/classes/sun/security/rsa/RSAKeyPairGenerator.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/classes/sun/security/rsa/RSAKeyPairGenerator.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, 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
@@ -55,7 +55,7 @@
 
     public RSAKeyPairGenerator() {
         // initialize to default in case the app does not call initialize()
-        initialize(1024, null);
+        initialize(2048, null);
     }
 
     // initialize the generator. See JCA doc
--- a/jdk/src/java.base/share/conf/security/java.security	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/conf/security/java.security	Mon Mar 07 16:38:23 2016 -0800
@@ -578,7 +578,7 @@
 #
 # Example:
 #   jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
-jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768
+jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024
 
 # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
 # processing in JSSE implementation.
--- a/jdk/src/java.base/share/native/libjava/Version.c	Mon Mar 07 11:54:42 2016 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2005, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "jni.h"
-#include "jni_util.h"
-#include "jvm.h"
-#include "jdk_util.h"
-
-#include "sun_misc_Version.h"
-
-static void setStaticIntField(JNIEnv* env, jclass cls, const char* name, jint value)
-{
-    jfieldID fid;
-    fid = (*env)->GetStaticFieldID(env, cls, name, "I");
-    if (fid != 0) {
-        (*env)->SetStaticIntField(env, cls, fid, value);
-    }
-}
-
-typedef void (JNICALL *GetJvmVersionInfo_fp)(JNIEnv*, jvm_version_info*, size_t);
-
-JNIEXPORT jboolean JNICALL
-Java_sun_misc_Version_getJvmVersionInfo(JNIEnv *env, jclass cls)
-{
-    jvm_version_info info;
-    GetJvmVersionInfo_fp func_p;
-
-    if (!JDK_InitJvmHandle()) {
-        JNU_ThrowInternalError(env, "Handle for JVM not found for symbol lookup");
-        return JNI_FALSE;
-    }
-    func_p = (GetJvmVersionInfo_fp) JDK_FindJvmEntry("JVM_GetVersionInfo");
-    if (func_p == NULL) {
-        return JNI_FALSE;
-    }
-
-    (*func_p)(env, &info, sizeof(info));
-    setStaticIntField(env, cls, "jvm_major_version", JVM_VERSION_MAJOR(info.jvm_version));
-    JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
-    setStaticIntField(env, cls, "jvm_minor_version", JVM_VERSION_MINOR(info.jvm_version));
-    JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
-    setStaticIntField(env, cls, "jvm_security_version", JVM_VERSION_SECURITY(info.jvm_version));
-    JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
-    setStaticIntField(env, cls, "jvm_build_number", JVM_VERSION_BUILD(info.jvm_version));
-    JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
-    setStaticIntField(env, cls, "jvm_patch_version", info.patch_version);
-    JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
-
-    return JNI_TRUE;
-}
-
-JNIEXPORT void JNICALL
-Java_sun_misc_Version_getJdkVersionInfo(JNIEnv *env, jclass cls)
-{
-    jdk_version_info info;
-
-    JDK_GetVersionInfo0(&info, sizeof(info));
-    setStaticIntField(env, cls, "jdk_major_version", JDK_VERSION_MAJOR(info.jdk_version));
-    JNU_CHECK_EXCEPTION(env);
-    setStaticIntField(env, cls, "jdk_minor_version", JDK_VERSION_MINOR(info.jdk_version));
-    JNU_CHECK_EXCEPTION(env);
-    setStaticIntField(env, cls, "jdk_security_version", JDK_VERSION_SECURITY(info.jdk_version));
-    JNU_CHECK_EXCEPTION(env);
-    setStaticIntField(env, cls, "jdk_build_number", JDK_VERSION_BUILD(info.jdk_version));
-    JNU_CHECK_EXCEPTION(env);
-    setStaticIntField(env, cls, "jdk_patch_version", info.patch_version);
-    JNU_CHECK_EXCEPTION(env);
-}
--- a/jdk/src/java.base/share/native/libjli/java.c	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.base/share/native/libjli/java.c	Mon Mar 07 16:38:23 2016 -0800
@@ -1470,7 +1470,7 @@
     jclass ver;
     jmethodID print;
 
-    NULL_CHECK(ver = FindBootStrapClass(env, "sun/misc/Version"));
+    NULL_CHECK(ver = FindBootStrapClass(env, "java/lang/VersionProps"));
     NULL_CHECK(print = (*env)->GetStaticMethodID(env,
                                                  ver,
                                                  (extraLF == JNI_TRUE) ? "println" : "print",
--- a/jdk/src/java.logging/share/classes/java/util/logging/Logger.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/java.logging/share/classes/java/util/logging/Logger.java	Mon Mar 07 16:38:23 2016 -0800
@@ -839,6 +839,7 @@
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
+     * @since 1.8
      */
     public void log(Level level, Supplier<String> msgSupplier) {
         if (!isLoggable(level)) {
--- a/jdk/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/RSAKeyPairGenerator.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/RSAKeyPairGenerator.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, 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
@@ -46,7 +46,7 @@
     // Supported by Microsoft Base, Strong and Enhanced Cryptographic Providers
     static final int KEY_SIZE_MIN = 512; // disallow MSCAPI min. of 384
     static final int KEY_SIZE_MAX = 16384;
-    private static final int KEY_SIZE_DEFAULT = 1024;
+    private static final int KEY_SIZE_DEFAULT = 2048;
 
     // size of the key to generate, KEY_SIZE_MIN <= keySize <= KEY_SIZE_MAX
     private int keySize;
--- a/jdk/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/SunMSCAPI.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/SunMSCAPI.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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
@@ -182,7 +182,7 @@
                  * Key Pair Generator engines
                  */
                 attrs.clear();
-                attrs.put("KeySize", "1024");
+                attrs.put("KeySize", "16384");
                 putService(new ProviderService(p, "KeyPairGenerator",
                            "RSA", "sun.security.mscapi.RSAKeyPairGenerator",
                            null, attrs));
--- a/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, 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
@@ -106,8 +106,15 @@
                 maxKeyLen = 2048;
             }
         } else {
-            // RSA, DH, and DSA
-            keySize = 1024;
+            if (algorithm.equals("DSA")) {
+                // keep default keysize at 1024 since larger keysizes may be
+                // incompatible with SHA1withDSA and SHA-2 Signature algs
+                // may not be supported by native pkcs11 implementations
+                keySize = 1024;
+            } else {
+                // RSA and DH
+                keySize = 2048;
+            }
             if ((minKeyLen == -1) || (minKeyLen < 512)) {
                 minKeyLen = 512;
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.jsobject/share/classes/jdk/internal/netscape/javascript/spi/JSObjectProvider.java	Mon Mar 07 16:38:23 2016 -0800
@@ -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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.netscape.javascript.spi;
+
+import java.applet.Applet;
+import netscape.javascript.JSException;
+import netscape.javascript.JSObject;
+
+public interface JSObjectProvider {
+    /**
+     * Return a JSObject for the window containing the given applet.
+     * Implementations of this class should return null if not connected to a
+     * browser, for example, when running in AppletViewer.
+     *
+     * @param applet The applet.
+     * @return JSObject for the window containing the given applet or null if we
+     * are not connected to a browser.
+     * @throws JSException when an error is encountered.
+     */
+    public JSObject getWindow(Applet applet) throws JSException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.jsobject/share/classes/netscape/javascript/JSException.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package netscape.javascript;
+
+/**
+ * Thrown when an exception is raised in the JavaScript engine. This is merely
+ * a marker class to indicate an exception relating to the JavaScript
+ * interface.
+ */
+public class JSException extends RuntimeException {
+    private static final long serialVersionUID = 2778103758223661489L;
+
+    /**
+     * Constructs a new JavaScript exception with null as it's detail message.
+     */
+    public JSException() {
+        super();
+    }
+
+    /**
+     * Construct a new JavaScript exception with the specified detail message.
+     *
+     * @param s The detail message
+     */
+    public JSException(String s) {
+        super(s);
+    }
+
+    /**
+     * Construct a new JavaScript exception with the specified cause.
+     *
+     * @param t Throwable cause
+     */
+    public JSException(Throwable t) {
+        super(t);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.jsobject/share/classes/netscape/javascript/JSObject.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,182 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package netscape.javascript;
+
+import jdk.internal.netscape.javascript.spi.JSObjectProvider;
+import java.applet.Applet;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Iterator;
+import java.util.ServiceLoader;
+
+/**
+ * <p>
+ * Allows Java code to manipulate JavaScript objects.
+ * </p>
+ *
+ * <p>
+ * When a JavaScript object is passed or returned to Java code, it
+ * is wrapped in an instance of {@code JSObject}. When a
+ * {@code JSObject} instance is passed to the JavaScript engine,
+ * it is unwrapped back to its original JavaScript object. The
+ * {@code JSObject} class provides a way to invoke JavaScript
+ * methods and examine JavaScript properties.
+ * </p>
+ *
+ * <p> Any data returned from the JavaScript engine to Java is
+ * converted to Java data types. Certain data passed to the JavaScript
+ * engine is converted to JavaScript data types.
+ * </p>
+ *
+ */
+public abstract class JSObject {
+    /**
+     * Constructs a new JSObject. Users should neither call this method nor
+     * subclass JSObject.
+     */
+    protected JSObject()  {
+    }
+
+    /**
+     * Calls a JavaScript method. Equivalent to
+     * "this.methodName(args[0], args[1], ...)" in JavaScript.
+     *
+     * @param methodName The name of the JavaScript method to be invoked.
+     * @param args the Java objects passed as arguments to the method.
+     * @return Result of the method.
+     * @throws JSException when an error is reported from the browser or
+     * JavaScript engine.
+     */
+    public abstract Object call(String methodName, Object... args) throws JSException;
+
+    /**
+     * Evaluates a JavaScript expression. The expression is a string of
+     * JavaScript source code which will be evaluated in the context given by
+     * "this".
+     *
+     * @param s The JavaScript expression.
+     * @return Result of the JavaScript evaluation.
+     * @throws JSException when an error is reported from the browser or
+     * JavaScript engine.
+     */
+    public abstract Object eval(String s) throws JSException;
+
+    /**
+     * Retrieves a named member of a JavaScript object. Equivalent to
+     * "this.name" in JavaScript.
+     *
+     * @param name The name of the JavaScript property to be accessed.
+     * @return The value of the propery.
+     * @throws JSException when an error is reported from the browser or
+     * JavaScript engine.
+     */
+    public abstract Object getMember(String name) throws JSException;
+
+    /**
+     * Sets a named member of a JavaScript object. Equivalent to
+     * "this.name = value" in JavaScript.
+     *
+     * @param name The name of the JavaScript property to be accessed.
+     * @param value The value of the propery.
+     * @throws JSException when an error is reported from the browser or
+     * JavaScript engine.
+     */
+    public abstract void setMember(String name, Object value) throws JSException;
+
+    /**
+     * Removes a named member of a JavaScript object. Equivalent
+     * to "delete this.name" in JavaScript.
+     *
+     * @param name The name of the JavaScript property to be removed.
+     * @throws JSException when an error is reported from the browser or
+     * JavaScript engine.
+     */
+    public abstract void removeMember(String name) throws JSException;
+
+    /**
+     * Retrieves an indexed member of a JavaScript object. Equivalent to
+     * "this[index]" in JavaScript.
+     *
+     * @param index The index of the array to be accessed.
+     * @return The value of the indexed member.
+     * @throws JSException when an error is reported from the browser or
+     * JavaScript engine.
+     */
+    public abstract Object getSlot(int index) throws JSException;
+
+    /**
+     * Sets an indexed member of a JavaScript object. Equivalent to
+     * "this[index] = value" in JavaScript.
+     *
+     * @param index The index of the array to be accessed.
+     * @param value The value to set
+     * @throws JSException when an error is reported from the browser or
+     * JavaScript engine.
+     */
+    public abstract void setSlot(int index, Object value) throws JSException;
+
+    /**
+     * Returns a JSObject for the window containing the given applet. This
+     * method only works when the Java code is running in a browser as an
+     * applet. The object returned may be used to access the HTML DOM directly.
+     *
+     * @param applet The applet.
+     * @return JSObject representing the window containing the given applet or
+     * {@code null} if we are not connected to a browser.
+     * @throws JSException when an error is reported from the browser or
+     * JavaScript engine or if applet is {@code null}
+     */
+    public static JSObject getWindow(Applet applet) throws JSException {
+        return ProviderLoader.callGetWindow(applet);
+    }
+
+    private static class ProviderLoader {
+        private static final JSObjectProvider provider;
+
+        static {
+            provider = AccessController.doPrivileged(
+                new PrivilegedAction<>() {
+                    @Override
+                    public JSObjectProvider run() {
+                        Iterator<JSObjectProvider> providers =
+                            ServiceLoader.loadInstalled(JSObjectProvider.class).iterator();
+                        if (providers.hasNext()) {
+                            return providers.next();
+                        }
+                        return null;
+                    }
+                }
+            );
+        }
+
+        private static JSObject callGetWindow(Applet applet) {
+            if (provider != null) {
+                return provider.getWindow(applet);
+            }
+            return null;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.jsobject/share/classes/netscape/javascript/package-info.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * <p>
+ * Provides Java code the ability to access the JavaScript engine and the
+ * HTML DOM in the web browser.
+ * </p>
+ *
+ * <p>
+ * The classes in this package were initially specified by Netscape, and are the
+ * de facto standard mechanism for calling JavaScript from the Java runtime.
+ * </p>
+ */
+
+package netscape.javascript;
--- a/jdk/test/TEST.groups	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/test/TEST.groups	Mon Mar 07 16:38:23 2016 -0800
@@ -28,7 +28,6 @@
 tier1 = \
     :jdk_lang \
     -java/lang/ProcessHandle/TreeTest.java \
-    -java/util/zip/TestLocalTime.java \
     :jdk_util \
     -java/util/WeakHashMap/GCDuringIteration.java \
     -java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java \
@@ -40,7 +39,6 @@
 
 tier2 = \
     java/lang/ProcessHandle/TreeTest.java \
-    java/util/zip/TestLocalTime.java \
     java/util/WeakHashMap/GCDuringIteration.java \
     java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java \
     java/util/concurrent/forkjoin/FJExceptionTableLeak.java \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/PBE/CheckPBEKeySize.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8151149
+ * @modules java.base/com.sun.crypto.provider
+ */
+
+import java.lang.reflect.*;
+import java.security.*;
+import javax.crypto.*;
+import javax.crypto.spec.*;
+import com.sun.crypto.provider.*;
+
+public class CheckPBEKeySize {
+
+    private static final String ALGO = "PBEWithSHA1AndDESede";
+    private static final int KEYSIZE = 112; // Triple DES effective key size
+
+    public static final void main(String[] args) throws Exception {
+
+        // Generate a PBE key
+        SecretKeyFactory skFac = SecretKeyFactory.getInstance("PBE");
+        SecretKey skey =
+            skFac.generateSecret(new PBEKeySpec("test123".toCharArray()));
+
+        // Initialize the PBE cipher
+        Cipher cipher = Cipher.getInstance(ALGO);
+        cipher.init(Cipher.ENCRYPT_MODE, skey);
+
+        // Permit access to the Cipher.spi field (a CipherSpi object)
+        Field spi = Cipher.class.getDeclaredField("spi");
+        spi.setAccessible(true);
+        Object value = spi.get(cipher);
+
+        // Permit access to the CipherSpi.engineGetKeySize method
+        Method engineGetKeySize =
+            PKCS12PBECipherCore$PBEWithSHA1AndDESede.class
+                .getDeclaredMethod("engineGetKeySize", Key.class);
+        engineGetKeySize.setAccessible(true);
+
+        // Check the key size
+        int keySize = (int) engineGetKeySize.invoke(value, skey);
+        if (keySize == KEYSIZE) {
+            System.out.println(ALGO + ".engineGetKeySize returns " + keySize +
+                " bits, as expected");
+            System.out.println("OK");
+        } else {
+            throw new Exception("ERROR: " + ALGO + " key size is incorrect");
+        }
+    }
+}
--- a/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,10 +83,10 @@
         KeyPair kp;
         KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH", "SunJCE");
 
-        // Sun's default uses a default psize of 1024 and
+        // Sun's default uses a default psize of 2048 and
         // lsize of (pSize / 2) but at least 384 bits
         kp = kpg.generateKeyPair();
-        checkKeyPair(kp, Sizes.ten24, Sizes.five12);
+        checkKeyPair(kp, Sizes.twenty48, Sizes.ten24);
 
         DHPublicKey publicKey = (DHPublicKey)kp.getPublic();
         BigInteger p = publicKey.getParams().getP();
@@ -98,15 +98,15 @@
 
         kpg.initialize(new DHParameterSpec(p, g, Sizes.ten24.getIntSize()));
         kp = kpg.generateKeyPair();
-        checkKeyPair(kp, Sizes.ten24, Sizes.ten24);
+        checkKeyPair(kp, Sizes.twenty48, Sizes.ten24);
 
         kpg.initialize(new DHParameterSpec(p, g, Sizes.five12.getIntSize()));
         kp = kpg.generateKeyPair();
-        checkKeyPair(kp, Sizes.ten24, Sizes.five12);
+        checkKeyPair(kp, Sizes.twenty48, Sizes.five12);
 
         kpg.initialize(new DHParameterSpec(p, g, Sizes.two56.getIntSize()));
         kp = kpg.generateKeyPair();
-        checkKeyPair(kp, Sizes.ten24, Sizes.two56);
+        checkKeyPair(kp, Sizes.twenty48, Sizes.two56);
 
         kpg.initialize(Sizes.five12.getIntSize());
         kp = kpg.generateKeyPair();
--- a/jdk/test/java/lang/ProcessHandle/Basic.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/test/java/lang/ProcessHandle/Basic.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,8 @@
 /*
  * @test
  * @library /test/lib/share/classes
- * @run testng InfoTest
+ * @modules jdk.management
+ * @run testng Basic
  * @summary Basic tests for ProcessHandler
  * @author Roger Riggs
  */
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -49,6 +49,7 @@
  * @test
  * @bug 8077350 8081566 8081567 8098852 8136597
  * @library /test/lib/share/classes
+ * @modules jdk.management
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
  * @run testng InfoTest
  * @summary Functions of ProcessHandle.Info
@@ -114,9 +115,13 @@
             long cpuLoopTime = 100;             // 100 ms
             String[] extraArgs = {"pid", "parent", "stdin"};
             JavaChild p1 = JavaChild.spawnJavaChild((Object[])extraArgs);
-            Instant afterStart = Instant.now();
+            Instant afterStart = null;
 
             try (BufferedReader lines = p1.outputReader()) {
+                // Read the args line to know the subprocess has started
+                lines.readLine();
+                afterStart = Instant.now();
+
                 Duration lastCpu = Duration.ofMillis(0L);
                 for (int j = 0; j < 10; j++) {
 
@@ -126,8 +131,7 @@
                     // Read cputime from child
                     Duration childCpuTime = null;
                     // Read lines from the child until the result from cputime is returned
-                    String s;
-                    while ((s = lines.readLine()) != null) {
+                    for (String s; (s = lines.readLine()) != null;) {
                         String[] split = s.trim().split(" ");
                         if (split.length == 3 && split[1].equals("cputime")) {
                             long nanos = Long.valueOf(split[2]);
--- a/jdk/test/java/lang/ProcessHandle/OnExitTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/test/java/lang/ProcessHandle/OnExitTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@
 /*
  * @test
  * @library /test/lib/share/classes
+ * @modules jdk.management
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
  * @run testng OnExitTest
  * @summary Functions of Process.onExit and ProcessHandle.onExit
--- a/jdk/test/java/lang/ProcessHandle/TreeTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/test/java/lang/ProcessHandle/TreeTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,6 +45,7 @@
 /*
  * @test
  * @library /test/lib/share/classes
+ * @modules jdk.management
  * @build jdk.test.lib.Utils
  * @run testng/othervm TreeTest
  * @summary Test counting and JavaChild.spawning and counting of Processes.
--- a/jdk/test/java/lang/StackWalker/StackStreamTest.java	Mon Mar 07 11:54:42 2016 +0530
+++ b/jdk/test/java/lang/StackWalker/StackStreamTest.java	Mon Mar 07 16:38:23 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  * @test
  * @bug 8140450
  * @summary Stack Stream Test
+ * @modules java.logging
  * @run main/othervm StackStreamTest
  */
 public class StackStreamTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/StringBuilder/Capacity.java	Mon Mar 07 16:38:23 2016 -0800
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8149330
+ * @summary Basic set of tests of capacity management
+ * @run testng Capacity
+ */
+
+import java.lang.reflect.Field;
+import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.SplittableRandom;
+
+import org.testng.annotations.Test;