Merge with default ihse-runtestprebuilt-branch
authorerikj
Thu, 11 Oct 2018 09:53:45 -0700
branchihse-runtestprebuilt-branch
changeset 56955 b6123001cf8c
parent 56952 2e2fa5dc9f38 (current diff)
parent 52097 8419d77e3635 (diff)
child 56956 a05fd2db5721
Merge with default
--- a/.hgtags	Wed Oct 10 14:15:38 2018 -0700
+++ b/.hgtags	Thu Oct 11 09:53:45 2018 -0700
@@ -517,3 +517,4 @@
 8897e41b327c0a5601c6ba2bba5d07f15a3ffc91 jdk-12+14
 8897e41b327c0a5601c6ba2bba5d07f15a3ffc91 jdk-12+14
 6f04692c7d5137ee34a6bd94c0c8a6c9219cb127 jdk-12+14
+f8626bcc169813a4b2a15880386b952719d1d6d1 jdk-12+15
--- a/src/hotspot/share/gc/epsilon/epsilonHeap.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/gc/epsilon/epsilonHeap.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -118,6 +118,8 @@
 }
 
 HeapWord* EpsilonHeap::allocate_work(size_t size) {
+  assert(is_object_aligned(size), "Allocation size should be aligned: " SIZE_FORMAT, size);
+
   HeapWord* res = _space->par_allocate(size);
 
   while (res == NULL) {
@@ -168,6 +170,7 @@
     }
   }
 
+  assert(is_object_aligned(res), "Object should be aligned: " PTR_FORMAT, p2i(res));
   return res;
 }
 
@@ -211,6 +214,9 @@
   // Always honor boundaries
   size = MAX2(min_size, MIN2(_max_tlab_size, size));
 
+  // Always honor alignment
+  size = align_up(size, MinObjAlignment);
+
   if (log_is_enabled(Trace, gc)) {
     ResourceMark rm;
     log_trace(gc)("TLAB size for \"%s\" (Requested: " SIZE_FORMAT "K, Min: " SIZE_FORMAT
--- a/src/hotspot/share/oops/instanceKlass.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -2738,48 +2738,6 @@
   return;
 }
 
-// tell if two classes have the same enclosing class (at package level)
-bool InstanceKlass::is_same_package_member(const Klass* class2, TRAPS) const {
-  if (class2 == this) return true;
-  if (!class2->is_instance_klass())  return false;
-
-  // must be in same package before we try anything else
-  if (!is_same_class_package(class2))
-    return false;
-
-  // As long as there is an outer_this.getEnclosingClass,
-  // shift the search outward.
-  const InstanceKlass* outer_this = this;
-  for (;;) {
-    // As we walk along, look for equalities between outer_this and class2.
-    // Eventually, the walks will terminate as outer_this stops
-    // at the top-level class around the original class.
-    bool ignore_inner_is_member;
-    const Klass* next = outer_this->compute_enclosing_class(&ignore_inner_is_member,
-                                                            CHECK_false);
-    if (next == NULL)  break;
-    if (next == class2)  return true;
-    outer_this = InstanceKlass::cast(next);
-  }
-
-  // Now do the same for class2.
-  const InstanceKlass* outer2 = InstanceKlass::cast(class2);
-  for (;;) {
-    bool ignore_inner_is_member;
-    Klass* next = outer2->compute_enclosing_class(&ignore_inner_is_member,
-                                                    CHECK_false);
-    if (next == NULL)  break;
-    // Might as well check the new outer against all available values.
-    if (next == this)  return true;
-    if (next == outer_this)  return true;
-    outer2 = InstanceKlass::cast(next);
-  }
-
-  // If by this point we have not found an equality between the
-  // two classes, we know they are in separate package members.
-  return false;
-}
-
 bool InstanceKlass::find_inner_classes_attr(int* ooff, int* noff, TRAPS) const {
   constantPoolHandle i_cp(THREAD, constants());
   for (InnerClassesIterator iter(this); !iter.done(); iter.next()) {
--- a/src/hotspot/share/oops/instanceKlass.hpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/oops/instanceKlass.hpp	Thu Oct 11 09:53:45 2018 -0700
@@ -507,9 +507,6 @@
                                        ClassLoaderData* loader_data,
                                        TRAPS);
  public:
-  // tell if two classes have the same enclosing class (at package level)
-  bool is_same_package_member(const Klass* class2, TRAPS) const;
-
   // initialization state
   bool is_loaded() const                   { return _init_state >= loaded; }
   bool is_linked() const                   { return _init_state >= linked; }
--- a/src/hotspot/share/opto/compile.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/opto/compile.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -3379,6 +3379,32 @@
       n->set_req(MemBarNode::Precedent, top());
     }
     break;
+  case Op_MemBarAcquire: {
+    if (n->as_MemBar()->trailing_load() && n->req() > MemBarNode::Precedent) {
+      // At parse time, the trailing MemBarAcquire for a volatile load
+      // is created with an edge to the load. After optimizations,
+      // that input may be a chain of Phis. If those phis have no
+      // other use, then the MemBarAcquire keeps them alive and
+      // register allocation can be confused.
+      ResourceMark rm;
+      Unique_Node_List wq;
+      wq.push(n->in(MemBarNode::Precedent));
+      n->set_req(MemBarNode::Precedent, top());
+      while (wq.size() > 0) {
+        Node* m = wq.pop();
+        if (m->outcnt() == 0) {
+          for (uint j = 0; j < m->req(); j++) {
+            Node* in = m->in(j);
+            if (in != NULL) {
+              wq.push(in);
+            }
+          }
+          m->disconnect_inputs(NULL, this);
+        }
+      }
+    }
+    break;
+  }
   case Op_RangeCheck: {
     RangeCheckNode* rc = n->as_RangeCheck();
     Node* iff = new IfNode(rc->in(0), rc->in(1), rc->_prob, rc->_fcnt);
--- a/src/hotspot/share/opto/memnode.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/opto/memnode.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -3174,21 +3174,43 @@
 }
 
 MemBarNode* MemBarNode::trailing_membar() const {
+  ResourceMark rm;
   Node* trailing = (Node*)this;
   VectorSet seen(Thread::current()->resource_area());
-  while (!trailing->is_MemBar() || !trailing->as_MemBar()->trailing()) {
-    if (seen.test_set(trailing->_idx)) {
-      // Dying subgraph?
-      return NULL;
-    }
-    for (DUIterator_Fast jmax, j = trailing->fast_outs(jmax); j < jmax; j++) {
-      Node* next = trailing->fast_out(j);
-      if (next != trailing && next->is_CFG()) {
-        trailing = next;
+  Node_Stack multis(0);
+  do {
+    Node* c = trailing;
+    uint i = 0;
+    do {
+      trailing = NULL;
+      for (; i < c->outcnt(); i++) {
+        Node* next = c->raw_out(i);
+        if (next != c && next->is_CFG()) {
+          if (c->is_MultiBranch()) {
+            if (multis.node() == c) {
+              multis.set_index(i+1);
+            } else {
+              multis.push(c, i+1);
+            }
+          }
+          trailing = next;
+          break;
+        }
+      }
+      if (trailing != NULL && !seen.test_set(trailing->_idx)) {
         break;
       }
-    }
-  }
+      while (multis.size() > 0) {
+        c = multis.node();
+        i = multis.index();
+        if (i < c->req()) {
+          break;
+        }
+        multis.pop();
+      }
+    } while (multis.size() > 0);
+  } while (!trailing->is_MemBar() || !trailing->as_MemBar()->trailing());
+
   MemBarNode* mb = trailing->as_MemBar();
   assert((mb->_kind == TrailingStore && _kind == LeadingStore) ||
          (mb->_kind == TrailingLoadStore && _kind == LeadingLoadStore), "bad trailing membar");
@@ -3197,14 +3219,30 @@
 }
 
 MemBarNode* MemBarNode::leading_membar() const {
+  ResourceMark rm;
   VectorSet seen(Thread::current()->resource_area());
+  Node_Stack regions(0);
   Node* leading = in(0);
   while (leading != NULL && (!leading->is_MemBar() || !leading->as_MemBar()->leading())) {
-    if (seen.test_set(leading->_idx)) {
-      // Dying subgraph?
-      return NULL;
+    while (leading == NULL || leading->is_top() || seen.test_set(leading->_idx)) {
+      leading = NULL;
+      while (regions.size() > 0) {
+        Node* r = regions.node();
+        uint i = regions.index();
+        if (i < r->req()) {
+          leading = r->in(i);
+          regions.set_index(i+1);
+        } else {
+          regions.pop();
+        }
+      }
+      if (leading == NULL) {
+        assert(regions.size() == 0, "all paths should have been tried");
+        return NULL;
+      }
     }
     if (leading->is_Region()) {
+      regions.push(leading, 2);
       leading = leading->in(1);
     } else {
       leading = leading->in(0);
--- a/src/hotspot/share/opto/parse2.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/opto/parse2.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -1346,7 +1346,7 @@
     if (prob <= PROB_MIN)  prob_str = (prob == PROB_MIN) ? "min" : "never";
     char prob_str_buf[30];
     if (prob_str == NULL) {
-      sprintf(prob_str_buf, "%g", prob);
+      jio_snprintf(prob_str_buf, sizeof(prob_str_buf), "%20.2f", prob);
       prob_str = prob_str_buf;
     }
     C->log()->elem("branch target_bci='%d' taken='%d' not_taken='%d' cnt='%f' prob='%s'",
@@ -2854,7 +2854,7 @@
   IdealGraphPrinter *printer = C->printer();
   if (printer && printer->should_print(1)) {
     char buffer[256];
-    sprintf(buffer, "Bytecode %d: %s", bci(), Bytecodes::name(bc()));
+    jio_snprintf(buffer, sizeof(buffer), "Bytecode %d: %s", bci(), Bytecodes::name(bc()));
     bool old = printer->traverse_outs();
     printer->set_traverse_outs(true);
     printer->print_method(buffer, 4);
--- a/src/hotspot/share/runtime/java.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/runtime/java.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -575,9 +575,6 @@
 }
 
 void vm_perform_shutdown_actions() {
-  // Warning: do not call 'exit_globals()' here. All threads are still running.
-  // Calling 'exit_globals()' will disable thread-local-storage and cause all
-  // kinds of assertions to trigger in debug mode.
   if (is_init_completed()) {
     Thread* thread = Thread::current_or_null();
     if (thread != NULL && thread->is_Java_thread()) {
--- a/src/hotspot/share/runtime/reflection.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/runtime/reflection.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -750,10 +750,12 @@
   InnerClassesIterator iter(outer);
   constantPoolHandle cp   (THREAD, outer->constants());
   for (; !iter.done(); iter.next()) {
-     int ioff = iter.inner_class_info_index();
-     int ooff = iter.outer_class_info_index();
+    int ioff = iter.inner_class_info_index();
+    int ooff = iter.outer_class_info_index();
 
-     if (inner_is_member && ioff != 0 && ooff != 0) {
+    if (inner_is_member && ioff != 0 && ooff != 0) {
+      if (cp->klass_name_at_matches(outer, ooff) &&
+          cp->klass_name_at_matches(inner, ioff)) {
         Klass* o = cp->klass_at(ooff, CHECK);
         if (o == outer) {
           Klass* i = cp->klass_at(ioff, CHECK);
@@ -761,14 +763,16 @@
             return;
           }
         }
-     }
-     if (!inner_is_member && ioff != 0 && ooff == 0 &&
-         cp->klass_name_at_matches(inner, ioff)) {
-        Klass* i = cp->klass_at(ioff, CHECK);
-        if (i == inner) {
-          return;
-        }
-     }
+      }
+    }
+
+    if (!inner_is_member && ioff != 0 && ooff == 0 &&
+        cp->klass_name_at_matches(inner, ioff)) {
+      Klass* i = cp->klass_at(ioff, CHECK);
+      if (i == inner) {
+        return;
+      }
+    }
   }
 
   // 'inner' not declared as an inner klass in outer
--- a/src/hotspot/share/runtime/thread.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/hotspot/share/runtime/thread.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -4212,10 +4212,10 @@
 //     <-- do not use anything that could get blocked by Safepoint -->
 //   + Disable tracing at JNI/JVM barriers
 //   + Set _vm_exited flag for threads that are still running native code
-//   + Delete this thread
 //   + Call exit_globals()
 //      > deletes tty
 //      > deletes PerfMemory resources
+//   + Delete this thread
 //   + Return to caller
 
 bool Threads::destroy_vm() {
@@ -4291,6 +4291,9 @@
 
   notify_vm_shutdown();
 
+  // exit_globals() will delete tty
+  exit_globals();
+
   // We are after VM_Exit::set_vm_exited() so we can't call
   // thread->smr_delete() or we will block on the Threads_lock.
   // Deleting the shutdown thread here is safe because another
@@ -4304,9 +4307,6 @@
   }
 #endif
 
-  // exit_globals() will delete tty
-  exit_globals();
-
   LogConfiguration::finalize();
 
   return true;
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Thu Oct 11 09:53:45 2018 -0700
@@ -969,9 +969,6 @@
             ProtectionDomain pd = (loader != null) ? lookupClassProtectionDomain() : null;
             String source = "__Lookup_defineClass__";
             Class<?> clazz = SharedSecrets.getJavaLangAccess().defineClass(loader, cn, bytes, pd, source);
-            assert clazz.getClassLoader() == lookupClass.getClassLoader()
-                    && clazz.getPackageName().equals(lookupClass.getPackageName())
-                    && protectionDomain(clazz) == lookupClassProtectionDomain();
             return clazz;
         }
 
--- a/src/java.base/share/classes/java/math/BigInteger.java	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/java.base/share/classes/java/math/BigInteger.java	Thu Oct 11 09:53:45 2018 -0700
@@ -41,6 +41,7 @@
 import jdk.internal.math.DoubleConsts;
 import jdk.internal.math.FloatConsts;
 import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.vm.annotation.Stable;
 
 /**
  * Immutable arbitrary-precision integers.  All operations behave as if
@@ -1219,8 +1220,10 @@
      * Initialize static constant array when class is loaded.
      */
     private static final int MAX_CONSTANT = 16;
-    private static BigInteger posConst[] = new BigInteger[MAX_CONSTANT+1];
-    private static BigInteger negConst[] = new BigInteger[MAX_CONSTANT+1];
+    @Stable
+    private static final BigInteger[] posConst = new BigInteger[MAX_CONSTANT+1];
+    @Stable
+    private static final BigInteger[] negConst = new BigInteger[MAX_CONSTANT+1];
 
     /**
      * The cache of powers of each radix.  This allows us to not have to
--- a/src/java.base/share/native/libjava/io_util.c	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/java.base/share/native/libjava/io_util.c	Thu Oct 11 09:53:45 2018 -0700
@@ -201,7 +201,7 @@
     }
 }
 
-JNIEXPORT void JNICALL
+void
 throwFileNotFoundException(JNIEnv *env, jstring path)
 {
     char buf[256];
--- a/src/java.base/share/native/libjava/io_util.h	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/java.base/share/native/libjava/io_util.h	Thu Oct 11 09:53:45 2018 -0700
@@ -54,8 +54,7 @@
 void writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off,
                 jint len, jboolean append, jfieldID fid);
 void fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags);
-JNIEXPORT void JNICALL
-throwFileNotFoundException(JNIEnv *env, jstring path);
+void throwFileNotFoundException(JNIEnv *env, jstring path);
 
 /*
  * Macros for managing platform strings.  The typical usage pattern is:
--- a/src/java.base/windows/native/libjava/io_util_md.c	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/java.base/windows/native/libjava/io_util_md.c	Thu Oct 11 09:53:45 2018 -0700
@@ -213,8 +213,7 @@
     return pathbuf;
 }
 
-JNIEXPORT FD JNICALL
-winFileHandleOpen(JNIEnv *env, jstring path, int flags)
+FD winFileHandleOpen(JNIEnv *env, jstring path, int flags)
 {
     const DWORD access =
         (flags & O_WRONLY) ?  GENERIC_WRITE :
--- a/src/java.base/windows/native/libjava/io_util_md.h	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/java.base/windows/native/libjava/io_util_md.h	Thu Oct 11 09:53:45 2018 -0700
@@ -56,8 +56,7 @@
  * Returns an opaque handle to file named by "path".  If an error occurs,
  * returns -1 and an exception is pending.
  */
-JNIEXPORT FD JNICALL
-winFileHandleOpen(JNIEnv *env, jstring path, int flags);
+FD winFileHandleOpen(JNIEnv *env, jstring path, int flags);
 
 /*
  * Macros to set/get fd from the java.io.FileDescriptor.
--- a/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp	Thu Oct 11 09:53:45 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -609,7 +609,7 @@
                 // get the channel name
                 char *channelName;
                 CFStringRef cfname = NULL;
-                const AudioObjectPropertyAddress address = {kAudioObjectPropertyElementName, port->scope, ch};
+                const AudioObjectPropertyAddress address = {kAudioObjectPropertyElementName, port->scope, (unsigned)ch};
                 UInt32 size = sizeof(cfname);
                 OSStatus err = AudioObjectGetPropertyData(mixer->deviceID, &address, 0, NULL, &size, &cfname);
                 if (err == noErr) {
--- a/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c	Wed Oct 10 14:15:38 2018 -0700
+++ b/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c	Thu Oct 11 09:53:45 2018 -0700
@@ -26,7 +26,7 @@
 
 /*
  *  This file implements a binding between Java and the hsdis
- *  dissasembler.  It should compile on Linux/Solaris and Windows.
+ *  disassembler.  It should compile on Linux/Solaris and Windows.
  *  The only platform dependent pieces of the code for doing
  *  dlopen/dlsym to find the entry point in hsdis.  All the rest is
  *  standard JNI code.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/regalloc/VolatileLoadMemBarsOnlyUses.java	Thu Oct 11 09:53:45 2018 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8210389
+ * @summary C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
+ *
+ * @run main/othervm -Xcomp -XX:CompileOnly=VolatileLoadMemBarsOnlyUses VolatileLoadMemBarsOnlyUses
+ *
+ */
+
+public class VolatileLoadMemBarsOnlyUses {
+
+    public static final int N = 400;
+    public static long instanceCount=-94L;
+    public static volatile byte byFld=-108;
+
+    public int mainTest(String[] strArr1) {
+
+        int i17=9, i19=1, i20=63, i21=-32916, i22=0, iArr[]=new int[N];
+        boolean b1=false;
+        double d3=76.18241;
+
+        for (int i : iArr) {
+            for (i17 = 2; i17 < 63; i17++) {
+                if (b1) break;
+                byFld += (byte)(0.131F + (i17 * i17));
+            }
+            for (i19 = 1; 63 > i19; ++i19) {
+                for (i21 = 1; i21 < 2; i21++) {
+                    d3 = i22;
+                    if (b1) continue;
+                    i20 = i21;
+                }
+                d3 -= byFld;
+                instanceCount = 46725L;
+            }
+            switch ((((i22 >>> 1) % 4) * 5) + 91) {
+            case 98:
+                break;
+            case 110:
+                break;
+            case 105:
+                break;
+            case 103:
+                break;
+            default:
+            }
+        }
+
+        return i20;
+    }
+    public static void main(String[] strArr) {
+        VolatileLoadMemBarsOnlyUses _instance = new VolatileLoadMemBarsOnlyUses();
+        for (int i = 0; i < 10; i++ ) {
+            _instance.mainTest(strArr);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestAlignment.java	Thu Oct 11 09:53:45 2018 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test TestAlignment
+ * @key gc
+ * @requires vm.gc.Epsilon & !vm.graal.enabled
+ * @summary Check Epsilon runs fine with (un)usual alignments
+ * @bug 8212005
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:+UseTLAB TestAlignment
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:-UseTLAB TestAlignment
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:+UseTLAB -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestAlignment
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:-UseTLAB -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestAlignment
+ */
+
+public class TestAlignment {
+    static Object sink;
+
+    public static void main(String[] args) throws Exception {
+        for (int c = 0; c < 1000; c++) {
+            sink = new byte[c];
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/InnerClassesAttr/Base.java	Thu Oct 11 09:53:45 2018 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package com.g;
+class Base {
+    static class Builder { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/InnerClassesAttr/Child.java	Thu Oct 11 09:53:45 2018 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package com.g;
+public final class Child extends Base {
+    public Builder setJobName() {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/InnerClassesAttr/InnerClassesTest.jasm	Thu Oct 11 09:53:45 2018 -0700
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 8079784
+ * @compile InnerClassesTest.jasm Base.java Child.java
+ * @run main com.n.InnerClassesTest
+ */
+
+// Test that if a class's InnerClasses attribute contains a class that is not
+// accessible to the class with the attribute then an IllegalAccessError
+// exception should not get thrown as a result of the class accessing other
+// classes in the InnerClasses attribute.
+//
+// In this test, class InnerClassesTest has an InnerClasses attribute with two
+// entries.  One for inaccessable (non-public) class com/g/Base and class
+// con/g/Base$Builder.  And, one entry for classes com/n/InnerClassTest and
+// com/n/InnerClasses/Test$Foo.  The test accesses com/n/InnerClsses/Test$Foo
+// by calling getSimpleName().  This should not cause an IllegalAccessError
+// exception to get thrown.
+//
+//
+// This jasm code was generated from the following Java code.  The only
+// difference is that, in the jasm code, the order of the entries in the
+// InnerClasses attributes for class InnerClassesTest were switched.
+//
+// package com.n;
+// import com.g.Child;
+//
+// public final class InnerClassesTest {
+//
+//     public static final class Foo { }
+//     void unused() {
+//         new Child().setJobName();
+//     }
+//
+//     public static void main(String[] args) {
+//         Class<?> clazz = InnerClassesTest.Foo.class;
+//         clazz.getSimpleName();
+//     }
+// }
+
+package com/n;
+
+super public final class InnerClassesTest$Foo version 53:0 {
+
+    public Method "<init>":"()V" stack 1 locals 1 {
+        aload_0;
+        invokespecial Method java/lang/Object."<init>":"()V";
+        return;
+    }
+
+public static final InnerClass Foo=class InnerClassesTest$Foo of class InnerClassesTest;
+
+} // end Class InnerClassesTest$Foo
+
+
+super public final class InnerClassesTest version 53:0 {
+
+
+    public Method "<init>":"()V" stack 1 locals 1 {
+        aload_0;
+        invokespecial    Method java/lang/Object."<init>":"()V";
+        return;
+    }
+
+    Method unused:"()V" stack 2 locals 1 {
+        new    class com/g/Child;
+        dup;
+        invokespecial    Method com/g/Child."<init>":"()V";
+        invokevirtual    Method com/g/Child.setJobName:"()Lcom/g/Base$Builder;";
+        pop;
+        return;
+    }
+
+    public static Method main:"([Ljava/lang/String;)V" stack 1 locals 2 {
+        ldc    class InnerClassesTest$Foo;
+        astore_1;
+        aload_1;
+        invokevirtual    Method java/lang/Class.getSimpleName:"()Ljava/lang/String;";
+        pop;
+        return;
+    }
+
+static InnerClass Builder=class com/g/Base$Builder of class com/g/Base;
+public static final InnerClass Foo=class InnerClassesTest$Foo of class InnerClassesTest;
+
+} // end Class InnerClassesTest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/PrintStringTableStats/PrintStringTableStatsTest.java	Thu Oct 11 09:53:45 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+
+/*
+ * @test PrintStringTableStatsTest
+ * @bug 8211821
+ * @library /test/lib
+ * @run main PrintStringTableStatsTest
+ */
+
+public class PrintStringTableStatsTest {
+    public static void main(String... args) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+            "-XX:+PrintStringTableStatistics",
+            "--version");
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldContain("Number of buckets");
+        output.shouldHaveExitValue(0);
+    }
+}
--- a/test/jdk/ProblemList.txt	Wed Oct 10 14:15:38 2018 -0700
+++ b/test/jdk/ProblemList.txt	Thu Oct 11 09:53:45 2018 -0700
@@ -874,8 +874,6 @@
 
 javax/rmi/ssl/SSLSocketParametersTest.sh                        8162906 generic-all
 
-javax/naming/module/RunBasic.java                               8211850 generic-all
-
 ############################################################################
 
 ###########################################################################
--- a/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java	Wed Oct 10 14:15:38 2018 -0700
+++ b/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java	Thu Oct 11 09:53:45 2018 -0700
@@ -1,6 +1,6 @@
 
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 import java.awt.Dimension;
 import java.awt.Point;
 import javax.swing.JDialog;
+import javax.swing.UIManager;
 import static org.testng.AssertJUnit.*;
 import org.testng.annotations.Test;
 import static org.jemmy2ext.JemmyExt.isIconified;
@@ -61,8 +62,9 @@
 
     private final ComponentChooser jDialogClassChooser = new ByClassChooser(JDialog.class);
 
-    @Test
-    public void test() throws Exception {
+    @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class)
+    public void test(String lookAndFeel) throws Exception {
+        UIManager.setLookAndFeel(lookAndFeel);
         new ClassReference(DialogDemo.class.getCanonicalName()).startApplication();
         JFrameOperator mainFrame = new JFrameOperator(DIALOG_DEMO_TITLE);
         JDialogOperator dialog = new JDialogOperator(DIALOG_TITLE);
--- a/test/jdk/sanity/client/SwingSet/src/SwingSet2DemoTest.java	Wed Oct 10 14:15:38 2018 -0700
+++ b/test/jdk/sanity/client/SwingSet/src/SwingSet2DemoTest.java	Thu Oct 11 09:53:45 2018 -0700
@@ -27,6 +27,7 @@
 import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JRadioButtonMenuItem;
 import javax.swing.ToolTipManager;
+import javax.swing.UIManager;
 import javax.swing.plaf.metal.MetalLookAndFeel;
 
 import org.jtregext.GuiTestListener;
@@ -58,7 +59,7 @@
  *          java.logging
  * @build org.jemmy2ext.JemmyExt
  * @build SwingSet2
- * @run testng SwingSet2DemoTest
+ * @run testng/timeout=600 SwingSet2DemoTest
  */
 @Listeners(GuiTestListener.class)
 public class SwingSet2DemoTest {
@@ -74,8 +75,9 @@
      *
      * @throws Exception
      */
-    @Test
-    public void test() throws Exception {
+    @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class)
+    public void test(String lookAndFeel) throws Exception {
+        UIManager.setLookAndFeel(lookAndFeel);
 
         new ClassReference(SwingSet2.class.getCanonicalName()).startApplication();
         JFrameOperator frameOperator = new JFrameOperator(SwingSet2.FRAME_TITLE);
@@ -192,4 +194,4 @@
         }
     }
 
-}
\ No newline at end of file
+}
--- a/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java	Wed Oct 10 14:15:38 2018 -0700
+++ b/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java	Thu Oct 11 09:53:45 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 import static com.sun.swingset3.demos.window.WindowDemo.*;
 import static org.jemmy2ext.JemmyExt.*;
 import static org.testng.AssertJUnit.*;
+import javax.swing.UIManager;
 import org.testng.annotations.Test;
 import org.netbeans.jemmy.ClassReference;
 import org.netbeans.jemmy.operators.JButtonOperator;
@@ -53,8 +54,9 @@
 @Listeners(GuiTestListener.class)
 public class WindowDemoTest {
 
-    @Test
-    public void test() throws Exception {
+    @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class)
+    public void test(String lookAndFeel) throws Exception {
+        UIManager.setLookAndFeel(lookAndFeel);
 
         new ClassReference(WindowDemo.class.getCanonicalName()).startApplication();
 
--- a/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java	Wed Oct 10 14:15:38 2018 -0700
+++ b/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java	Thu Oct 11 09:53:45 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -406,7 +406,7 @@
                 Window[] windows = Window.getWindows();
                 int windowCount = 0;
                 for (Window w : windows) {
-                    if (w.getClass().equals(JWindow.class)) {
+                    if (w.getClass().equals(JWindow.class) && ((JWindow)w).isShowing()) {
                         windowCount++;
                     }
                 }
@@ -427,7 +427,7 @@
                 Window[] windows = Window.getWindows();
                 int windowIndex = 0;
                 for (Window w : windows) {
-                    if (w.getClass().equals(JWindow.class)) {
+                    if (w.getClass().equals(JWindow.class) && ((JWindow)w).isShowing()) {
                         if (windowIndex == index) {
                             return (JWindow) w;
                         }
@@ -565,7 +565,7 @@
 
         @Override
         public boolean checkComponent(Component comp) {
-            return comp.getClass().equals(clazz);
+            return comp.getClass().equals(clazz) && comp.isShowing();
         }
 
         @Override
--- a/test/jdk/sanity/client/lib/SwingSet2/src/SwingSet2.java	Wed Oct 10 14:15:38 2018 -0700
+++ b/test/jdk/sanity/client/lib/SwingSet2/src/SwingSet2.java	Thu Oct 11 09:53:45 2018 -0700
@@ -323,8 +323,6 @@
                        "FileMenu.exit_accessible_description", new ExitAction(this)
         );
 
-        // Create these menu items for the first SwingSet only.
-        if (numSSs == 0) {
         // ***** create laf switcher menu
         lafMenu = (JMenu) menuBar.add(new JMenu(getString("LafMenu.laf_label")));
         lafMenu.setMnemonic(getMnemonic("LafMenu.laf_mnemonic"));
@@ -432,7 +430,6 @@
                 "OptionsMenu.dragEnabled_mnemonic",
                 "OptionsMenu.dragEnabled_accessible_description",
                 new DragSupportAction());
-        }
 
         // ***** create the multiscreen menu, if we have multiple screens
         GraphicsDevice[] screens = GraphicsEnvironment.
@@ -1258,4 +1255,4 @@
             return className;
         }
     }
-}
\ No newline at end of file
+}