Merge
authordlong
Fri, 09 Jan 2015 13:28:02 -0500
changeset 28490 39f2d17d9be3
parent 28489 f395f4b55ea1 (diff)
parent 28398 43839f0cb0e8 (current diff)
child 28491 fa9243da0080
Merge
hotspot/test/gc/g1/TestEagerReclaimHumongousRegions2.java
hotspot/test/gc/g1/TestG1TraceReclaimDeadHumongousObjectsAtYoungGC.java
jdk/src/java.base/share/classes/sun/nio/fs/AbstractPath.java
jdk/test/javax/swing/JComboBox/ConsumedEscTest/ConsumedEscTest.java
langtools/test/tools/sjavac/SJavac.java
--- a/hotspot/src/share/vm/opto/cfgnode.hpp	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/src/share/vm/opto/cfgnode.hpp	Fri Jan 09 13:28:02 2015 -0500
@@ -361,22 +361,36 @@
 #endif
 };
 
-class IfTrueNode : public CProjNode {
+class IfProjNode : public CProjNode {
 public:
-  IfTrueNode( IfNode *ifnode ) : CProjNode(ifnode,1) {
+  IfProjNode(IfNode *ifnode, uint idx) : CProjNode(ifnode,idx) {}
+  virtual Node *Identity(PhaseTransform *phase);
+
+protected:
+  // Type of If input when this branch is always taken
+  virtual bool always_taken(const TypeTuple* t) const = 0;
+};
+
+class IfTrueNode : public IfProjNode {
+public:
+  IfTrueNode( IfNode *ifnode ) : IfProjNode(ifnode,1) {
     init_class_id(Class_IfTrue);
   }
   virtual int Opcode() const;
-  virtual Node *Identity( PhaseTransform *phase );
+
+protected:
+  virtual bool always_taken(const TypeTuple* t) const { return t == TypeTuple::IFTRUE; }
 };
 
-class IfFalseNode : public CProjNode {
+class IfFalseNode : public IfProjNode {
 public:
-  IfFalseNode( IfNode *ifnode ) : CProjNode(ifnode,0) {
+  IfFalseNode( IfNode *ifnode ) : IfProjNode(ifnode,0) {
     init_class_id(Class_IfFalse);
   }
   virtual int Opcode() const;
-  virtual Node *Identity( PhaseTransform *phase );
+
+protected:
+  virtual bool always_taken(const TypeTuple* t) const { return t == TypeTuple::IFFALSE; }
 };
 
 
--- a/hotspot/src/share/vm/opto/ifnode.cpp	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/src/share/vm/opto/ifnode.cpp	Fri Jan 09 13:28:02 2015 -0500
@@ -1122,12 +1122,21 @@
 
 //------------------------------Identity---------------------------------------
 // If the test is constant & we match, then we are the input Control
-Node *IfTrueNode::Identity( PhaseTransform *phase ) {
+Node *IfProjNode::Identity(PhaseTransform *phase) {
   // Can only optimize if cannot go the other way
   const TypeTuple *t = phase->type(in(0))->is_tuple();
-  return ( t == TypeTuple::IFNEITHER || t == TypeTuple::IFTRUE )
-    ? in(0)->in(0)              // IfNode control
-    : this;                     // no progress
+  if (t == TypeTuple::IFNEITHER ||
+      // kill dead branch first otherwise the IfNode's control will
+      // have 2 control uses (the IfNode that doesn't go away because
+      // it still has uses and this branch of the
+      // If). Node::has_special_unique_user() will cause this node to
+      // be reprocessed once the dead branch is killed.
+      (always_taken(t) && in(0)->outcnt() == 1)) {
+    // IfNode control
+    return in(0)->in(0);
+  }
+  // no progress
+  return this;
 }
 
 //------------------------------dump_spec--------------------------------------
@@ -1195,13 +1204,3 @@
   // Progress
   return iff;
 }
-
-//------------------------------Identity---------------------------------------
-// If the test is constant & we match, then we are the input Control
-Node *IfFalseNode::Identity( PhaseTransform *phase ) {
-  // Can only optimize if cannot go the other way
-  const TypeTuple *t = phase->type(in(0))->is_tuple();
-  return ( t == TypeTuple::IFNEITHER || t == TypeTuple::IFFALSE )
-    ? in(0)->in(0)              // IfNode control
-    : this;                     // no progress
-}
--- a/hotspot/src/share/vm/opto/node.cpp	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/src/share/vm/opto/node.cpp	Fri Jan 09 13:28:02 2015 -0500
@@ -1080,18 +1080,21 @@
   assert(outcnt() == 1, "match only for unique out");
   Node* n = unique_out();
   int op  = Opcode();
-  if( this->is_Store() ) {
+  if (this->is_Store()) {
     // Condition for back-to-back stores folding.
     return n->Opcode() == op && n->in(MemNode::Memory) == this;
   } else if (this->is_Load()) {
     // Condition for removing an unused LoadNode from the MemBarAcquire precedence input
     return n->Opcode() == Op_MemBarAcquire;
-  } else if( op == Op_AddL ) {
+  } else if (op == Op_AddL) {
     // Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y))
     return n->Opcode() == Op_ConvL2I && n->in(1) == this;
-  } else if( op == Op_SubI || op == Op_SubL ) {
+  } else if (op == Op_SubI || op == Op_SubL) {
     // Condition for subI(x,subI(y,z)) ==> subI(addI(x,z),y)
     return n->Opcode() == op && n->in(2) == this;
+  } else if (is_If() && (n->is_IfFalse() || n->is_IfTrue())) {
+    // See IfProjNode::Identity()
+    return true;
   }
   return false;
 };
--- a/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java	Fri Jan 09 13:28:02 2015 -0500
@@ -34,6 +34,7 @@
 /*
  * @test
  * @bug 8059624 8064669
+ * @ignore 8066998
  * @library /testlibrary /../../test/lib
  * @build ForceNMethodSweepTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
--- a/hotspot/test/runtime/6888954/vmerrors.sh	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/test/runtime/6888954/vmerrors.sh	Fri Jan 09 13:28:02 2015 -0500
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -71,11 +71,12 @@
 # EXCEPTION_ACCESS_VIOLATION - Win-*
 # SIGBUS - Solaris SPARC-64
 # SIGSEGV - Linux-*, Solaris SPARC-32, Solaris X86-*
+# SIGILL - Aix
 #
 # Note: would like to use "pc=0x00*0f," in the pattern, but Solaris SPARC-*
 # gets its signal at a PC in test_error_handler().
 #
-bad_func_ptr_re='(SIGBUS|SIGSEGV|EXCEPTION_ACCESS_VIOLATION).* at pc='
+bad_func_ptr_re='(SIGBUS|SIGSEGV|SIGILL|EXCEPTION_ACCESS_VIOLATION).* at pc='
 guarantee_re='guarantee[(](str|num).*failed: *'
 fatal_re='fatal error: *'
 tail_1='.*expected null'
--- a/hotspot/test/serviceability/dcmd/DynLibDcmdTest.java	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/test/serviceability/dcmd/DynLibDcmdTest.java	Fri Jan 09 13:28:02 2015 -0500
@@ -3,7 +3,7 @@
 import com.oracle.java.testlibrary.Platform;
 
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,14 +39,16 @@
         String result = DcmdUtil.executeDcmd("VM.dynlibs");
 
         String osDependentBaseString = null;
-        if (Platform.isSolaris()) {
+        if (Platform.isAix()) {
+            osDependentBaseString = "lib%s.so";
+        } else if (Platform.isLinux()) {
+            osDependentBaseString = "lib%s.so";
+        } else if (Platform.isOSX()) {
+            osDependentBaseString = "lib%s.dylib";
+        } else if (Platform.isSolaris()) {
             osDependentBaseString = "lib%s.so";
         } else if (Platform.isWindows()) {
             osDependentBaseString = "%s.dll";
-        } else if (Platform.isOSX()) {
-            osDependentBaseString = "lib%s.dylib";
-        } else if (Platform.isLinux()) {
-            osDependentBaseString = "lib%s.so";
         }
 
         if (osDependentBaseString == null) {
--- a/hotspot/test/test_env.sh	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/test/test_env.sh	Fri Jan 09 13:28:02 2015 -0500
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#  Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+#  Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
 #  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 # 
 #  This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | Darwin )
+  AIX | Darwin | Linux | SunOS )
     NULL=/dev/null
     PS=":"
     FS="/"
@@ -133,26 +133,31 @@
 fi
 
 VM_OS="unknown"
-grep "solaris" vm_version.out > ${NULL}
+grep "aix" vm_version.out > ${NULL}
 if [ $? = 0 ]
 then
-  VM_OS="solaris"
+  VM_OS="aix"
+fi
+grep "bsd" vm_version.out > ${NULL}
+if [ $? = 0 ]
+then
+  VM_OS="bsd"
 fi
 grep "linux" vm_version.out > ${NULL}
 if [ $? = 0 ]
 then
   VM_OS="linux"
 fi
+grep "solaris" vm_version.out > ${NULL}
+if [ $? = 0 ]
+then
+  VM_OS="solaris"
+fi
 grep "windows" vm_version.out > ${NULL}
 if [ $? = 0 ]
 then
   VM_OS="windows"
 fi
-grep "bsd" vm_version.out > ${NULL}
-if [ $? = 0 ]
-then
-  VM_OS="bsd"
-fi
 
 VM_CPU="unknown"
 grep "sparc" vm_version.out > ${NULL}
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java	Fri Jan 09 13:28:02 2015 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -68,6 +68,18 @@
         return dataModel.equals("64");
     }
 
+    public static boolean isAix() {
+        return isOs("aix");
+    }
+
+    public static boolean isLinux() {
+        return isOs("linux");
+    }
+
+    public static boolean isOSX() {
+        return isOs("mac");
+    }
+
     public static boolean isSolaris() {
         return isOs("sunos");
     }
@@ -76,14 +88,6 @@
         return isOs("win");
     }
 
-    public static boolean isOSX() {
-        return isOs("mac");
-    }
-
-    public static boolean isLinux() {
-        return isOs("linux");
-    }
-
     private static boolean isOs(String osname) {
         return osName.toLowerCase().startsWith(osname.toLowerCase());
     }
@@ -140,7 +144,9 @@
      */
     public static boolean shouldSAAttach() throws Exception {
 
-        if (isLinux()) {
+        if (isAix()) {
+            return false;   // SA not implemented.
+        } else if (isLinux()) {
             return canPtraceAttachLinux();
         } else if (isOSX()) {
             return canAttachOSX();
--- a/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java	Thu Jan 08 17:11:49 2015 -0800
+++ b/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java	Fri Jan 09 13:28:02 2015 -0500
@@ -45,7 +45,7 @@
     private static enum MethodGroup {
         ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64"),
         BITNESS("is32bit", "is64bit"),
-        OS("isLinux", "isSolaris", "isWindows", "isOSX"),
+        OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
         VM_TYPE("isClient", "isServer", "isGraal", "isMinimal"),
         IGNORED("isEmbedded", "isDebugBuild", "shouldSAAttach",
                 "canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");