Merge
authorcoleenp
Mon, 15 Oct 2012 22:33:19 -0400
changeset 14081 504ab928597a
parent 14072 11606bd0741b (current diff)
parent 14080 801ad8934f8f (diff)
child 14082 7425bbf64ead
Merge
hotspot/src/share/vm/classfile/classFileParser.cpp
hotspot/src/share/vm/memory/universe.cpp
hotspot/src/share/vm/runtime/globals.hpp
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon Oct 15 22:33:19 2012 -0400
@@ -67,7 +67,7 @@
 
 #define JAVA_CLASSFILE_MAGIC              0xCAFEBABE
 #define JAVA_MIN_SUPPORTED_VERSION        45
-#define JAVA_MAX_SUPPORTED_VERSION        51
+#define JAVA_MAX_SUPPORTED_VERSION        52
 #define JAVA_MAX_SUPPORTED_MINOR_VERSION  0
 
 // Used for two backward compatibility reasons:
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Mon Oct 15 22:33:19 2012 -0400
@@ -413,8 +413,7 @@
 }
 
 bool java_lang_String::equals(oop java_string, jchar* chars, int len) {
-  assert(SharedSkipVerify ||
-         java_string->klass() == SystemDictionary::String_klass(),
+  assert(java_string->klass() == SystemDictionary::String_klass(),
          "must be java_string");
   typeArrayOop value  = java_lang_String::value(java_string);
   int          offset = java_lang_String::offset(java_string);
--- a/hotspot/src/share/vm/memory/universe.cpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/memory/universe.cpp	Mon Oct 15 22:33:19 2012 -0400
@@ -1268,10 +1268,6 @@
 }
 
 void Universe::verify(bool silent, VerifyOption option) {
-  if (SharedSkipVerify) {
-    return;
-  }
-
   // The use of _verify_in_progress is a temporary work around for
   // 6320749.  Don't bother with a creating a class to set and clear
   // it since it is only used in this method and the control flow is
--- a/hotspot/src/share/vm/oops/klass.cpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/oops/klass.cpp	Mon Oct 15 22:33:19 2012 -0400
@@ -356,12 +356,11 @@
 }
 
 void Klass::append_to_sibling_list() {
-  debug_only(if (!SharedSkipVerify) verify();)
+  debug_only(verify();)
   // add ourselves to superklass' subklass list
   InstanceKlass* super = superklass();
   if (super == NULL) return;        // special case: class Object
-  assert(SharedSkipVerify ||
-         (!super->is_interface()    // interfaces cannot be supers
+  assert((!super->is_interface()    // interfaces cannot be supers
           && (super->superklass() == NULL || !is_interface())),
          "an interface can only be a subklass of Object");
   Klass* prev_first_subklass = super->subklass_oop();
@@ -371,7 +370,7 @@
   }
   // make ourselves the superklass' first subklass
   super->set_subklass(this);
-  debug_only(if (!SharedSkipVerify) verify();)
+  debug_only(verify();)
 }
 
 void Klass::remove_from_sibling_list() {
--- a/hotspot/src/share/vm/runtime/globals.hpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Mon Oct 15 22:33:19 2012 -0400
@@ -3539,10 +3539,6 @@
   product(uintx, SharedDummyBlockSize, 0,                                   \
           "Size of dummy block used to shift heap addresses (in bytes)")    \
                                                                             \
-  diagnostic(bool, SharedSkipVerify, false,                                 \
-          "Skip assert() and verify() which page-in unwanted shared "       \
-          "objects. ")                                                      \
-                                                                            \
   diagnostic(bool, EnableInvokeDynamic, true,                               \
           "support JSR 292 (method handles, invokedynamic, "                \
           "anonymous classes")                                              \
--- a/hotspot/src/share/vm/runtime/handles.cpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/runtime/handles.cpp	Mon Oct 15 22:33:19 2012 -0400
@@ -48,7 +48,7 @@
 oop* HandleArea::allocate_handle(oop obj) {
   assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
   assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
-  assert(SharedSkipVerify || obj->is_oop(), "sanity check");
+  assert(obj->is_oop(), "sanity check");
   return real_allocate_handle(obj);
 }
 
--- a/hotspot/src/share/vm/runtime/handles.hpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/runtime/handles.hpp	Mon Oct 15 22:33:19 2012 -0400
@@ -110,11 +110,11 @@
     /* Constructors */                           \
     type##Handle ()                              : Handle()                 {} \
     type##Handle (type##Oop obj) : Handle((oop)obj) {                         \
-      assert(SharedSkipVerify || is_null() || ((oop)obj)->is_a(),             \
+      assert(is_null() || ((oop)obj)->is_a(),                                 \
              "illegal type");                                                 \
     }                                                                         \
     type##Handle (Thread* thread, type##Oop obj) : Handle(thread, (oop)obj) { \
-      assert(SharedSkipVerify || is_null() || ((oop)obj)->is_a(), "illegal type");  \
+      assert(is_null() || ((oop)obj)->is_a(), "illegal type");                \
     }                                                                         \
     \
     /* Operators for ease of use */              \
@@ -201,11 +201,11 @@
   /* Constructors */
   instanceKlassHandle () : KlassHandle() {}
   instanceKlassHandle (const Klass* k) : KlassHandle(k) {
-    assert(SharedSkipVerify || k == NULL || k->oop_is_instance(),
+    assert(k == NULL || k->oop_is_instance(),
            "illegal type");
   }
   instanceKlassHandle (Thread* thread, const Klass* k) : KlassHandle(thread, k) {
-    assert(SharedSkipVerify || k == NULL || k->oop_is_instance(),
+    assert(k == NULL || k->oop_is_instance(),
            "illegal type");
   }
   /* Access to klass part */
--- a/hotspot/test/runtime/6929067/Test6929067.sh	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/test/runtime/6929067/Test6929067.sh	Mon Oct 15 22:33:19 2012 -0400
@@ -4,6 +4,7 @@
 ## @test Test6929067.sh
 ## @bug 6929067
 ## @summary Stack guard pages should be removed when thread is detached
+## @compile T.java
 ## @run shell Test6929067.sh
 ##
 
@@ -33,31 +34,97 @@
     ;;
 esac
 
-# Choose arch: i386 or amd64 (test is Linux-specific)
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion > vm_version.out 2>&1 
+
+# Bitness:
 # Cannot simply look at TESTVMOPTS as -d64 is not
 # passed if there is only a 64-bit JVM available.
 
-${TESTJAVA}/bin/java ${TESTVMOPTS} -version 2>1 | grep "64-Bit" >/dev/null
+grep "64-Bit" vm_version.out > ${NULL}
 if [ "$?" = "0" ]
 then
-  ARCH=amd64
+  COMP_FLAG="-m64"
 else
-  ARCH=i386
+  COMP_FLAG="-m32"
 fi
 
-LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${ARCH}/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH
+
+# Architecture:
+# Translate uname output to JVM directory name, but permit testing
+# 32-bit x86 on an x64 platform.
+ARCH=`uname -m`
+case "$ARCH" in
+  x86_64)
+    if [ "$COMP_FLAG" = "-m32" ]; then
+      ARCH=i386
+    else 
+      ARCH=amd64
+    fi
+    ;;
+  ppc64)
+    if [ "$COMP_FLAG" = "-m32" ]; then
+      ARCH=ppc
+    else 
+      ARCH=ppc64
+    fi
+    ;;
+  sparc64)
+    if [ "$COMP_FLAG" = "-m32" ]; then
+      ARCH=sparc
+    else 
+      ARCH=sparc64
+    fi
+    ;;
+  arm*)
+    # 32-bit ARM machine: compiler may not recognise -m32
+    COMP_FLAG=""
+    ARCH=arm
+    ;;
+  aarch64)
+    # 64-bit arm machine, could be testing 32 or 64-bit:
+    if [ "$COMP_FLAG" = "-m32" ]; then
+      ARCH=arm
+    else 
+      ARCH=aarch64
+    fi
+    ;;
+  i586)
+    ARCH=i386
+    ;;
+  i686)
+    ARCH=i386
+    ;;
+  # Assuming other ARCH values need no translation
+esac
+
+
+# VM type: need to know server or client
+VMTYPE=client
+grep Server vm_version.out > ${NULL}
+if [ "$?" = "0" ]
+then
+  VMTYPE=server
+fi
+
+
+LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${ARCH}/${VMTYPE}:/usr/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
 
-THIS_DIR=`pwd`
+cp ${TESTSRC}${FS}invoke.c .
 
-cp ${TESTSRC}${FS}invoke.c ${THIS_DIR}
-cp ${TESTSRC}${FS}T.java ${THIS_DIR}
-
+# Copy the result of our @compile action:
+cp ${TESTCLASSES}${FS}T.class .
 
 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
 
-${TESTJAVA}${FS}bin${FS}javac T.java
+echo "Architecture: ${ARCH}"
+echo "Compilation flag: ${COMP_FLAG}"
+echo "VM type: ${VMTYPE}"
 
-gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/${ARCH}/client/libjvm.so
+gcc -DLINUX ${COMP_FLAG} -o invoke \
+  -I${TESTJAVA}/include -I${TESTJAVA}/include/linux \
+  -L${TESTJAVA}/jre/lib/${ARCH}/${VMTYPE} \
+  -ljvm -lpthread invoke.c
+
 ./invoke
 exit $?