Merge
authorfparain
Wed, 31 Jul 2013 08:28:18 -0700
changeset 18989 2c0b1020ea68
parent 18983 00ba7aea744c (current diff)
parent 18988 0e7cbc5c39ec (diff)
child 18992 fc6a8ffa7278
Merge
--- a/hotspot/src/share/vm/ci/ciReplay.cpp	Fri Jul 26 12:37:39 2013 -0700
+++ b/hotspot/src/share/vm/ci/ciReplay.cpp	Wed Jul 31 08:28:18 2013 -0700
@@ -299,7 +299,7 @@
     Symbol* method_signature = parse_symbol(CHECK_NULL);
     Method* m = k->find_method(method_name, method_signature);
     if (m == NULL) {
-      report_error("can't find method");
+      report_error("Can't find method");
     }
     return m;
   }
@@ -398,8 +398,8 @@
 
   // compile <klass> <name> <signature> <entry_bci> <comp_level>
   void process_compile(TRAPS) {
-    // methodHandle method;
     Method* method = parse_method(CHECK);
+    if (had_error()) return;
     int entry_bci = parse_int("entry_bci");
     const char* comp_level_label = "comp_level";
     int comp_level = parse_int(comp_level_label);
@@ -440,6 +440,7 @@
   //
   void process_ciMethod(TRAPS) {
     Method* method = parse_method(CHECK);
+    if (had_error()) return;
     ciMethodRecord* rec = new_ciMethod(method);
     rec->invocation_counter = parse_int("invocation_counter");
     rec->backedge_counter = parse_int("backedge_counter");
@@ -451,6 +452,7 @@
   // ciMethodData <klass> <name> <signature> <state> <current mileage> orig <length> # # ... data <length> # # ... oops <length>
   void process_ciMethodData(TRAPS) {
     Method* method = parse_method(CHECK);
+    if (had_error()) return;
     /* jsut copied from Method, to build interpret data*/
     if (InstanceRefKlass::owns_pending_list_lock((JavaThread*)THREAD)) {
       return;
--- a/hotspot/src/share/vm/memory/metaspace.cpp	Fri Jul 26 12:37:39 2013 -0700
+++ b/hotspot/src/share/vm/memory/metaspace.cpp	Wed Jul 31 08:28:18 2013 -0700
@@ -2254,10 +2254,11 @@
 
 void SpaceManager::deallocate(MetaWord* p, size_t word_size) {
   assert_lock_strong(_lock);
+  size_t raw_word_size = get_raw_word_size(word_size);
   size_t min_size = TreeChunk<Metablock, FreeList>::min_size();
-  assert(word_size >= min_size,
+  assert(raw_word_size >= min_size,
     err_msg("Should not deallocate dark matter " SIZE_FORMAT, word_size));
-  block_freelists()->return_block(p, word_size);
+  block_freelists()->return_block(p, raw_word_size);
 }
 
 // Adds a chunk to the list of chunks in use.
--- a/hotspot/test/runtime/6929067/Test6929067.sh	Fri Jul 26 12:37:39 2013 -0700
+++ b/hotspot/test/runtime/6929067/Test6929067.sh	Wed Jul 31 08:28:18 2013 -0700
@@ -3,6 +3,7 @@
 ##
 ## @test Test6929067.sh
 ## @bug 6929067
+## @bug 8021296
 ## @summary Stack guard pages should be removed when thread is detached
 ## @compile T.java
 ## @run shell Test6929067.sh
@@ -21,6 +22,11 @@
 OS=`uname -s`
 case "$OS" in
   Linux)
+    gcc_cmd=`which gcc`
+    if [ "x$gcc_cmd" == "x" ]; then
+        echo "WARNING: gcc not found. Cannot execute test." 2>&1
+        exit 0;
+    fi
     NULL=/dev/null
     PS=":"
     FS="/"
@@ -119,10 +125,10 @@
 # Check to ensure you have a /usr/lib/libpthread.so if you don't please look
 # for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation.
 
-gcc -DLINUX ${COMP_FLAG} -o invoke \
-  -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
-  -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \
-  -ljvm -lpthread invoke.c
+$gcc_cmd -DLINUX ${COMP_FLAG} -o invoke \
+    -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
+    -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \
+    -ljvm -lpthread invoke.c
 
 ./invoke
 exit $?
--- a/hotspot/test/runtime/7107135/Test7107135.sh	Fri Jul 26 12:37:39 2013 -0700
+++ b/hotspot/test/runtime/7107135/Test7107135.sh	Wed Jul 31 08:28:18 2013 -0700
@@ -27,6 +27,7 @@
 ##
 ## @test Test7107135.sh
 ## @bug 7107135
+## @bug 8021296
 ## @summary Stack guard pages lost after loading library with executable stack.
 ## @run shell Test7107135.sh
 ##
@@ -45,6 +46,11 @@
 case "$OS" in
   Linux)
     echo "Testing on Linux"
+    gcc_cmd=`which gcc`
+    if [ "x$gcc_cmd" == "x" ]; then
+        echo "WARNING: gcc not found. Cannot execute test." 2>&1
+        exit 0;
+    fi
     ;;
   *)
     NULL=NUL
@@ -62,7 +68,10 @@
 cp ${TESTSRC}${FS}*.java ${THIS_DIR}
 ${TESTJAVA}${FS}bin${FS}javac *.java
 
-gcc -fPIC -shared -c -o test.o -I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux ${TESTSRC}${FS}test.c
+$gcc_cmd -fPIC -shared -c -o test.o \
+    -I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux \
+    ${TESTSRC}${FS}test.c
+
 ld -shared -z   execstack -o libtest-rwx.so test.o
 ld -shared -z noexecstack -o libtest-rw.so  test.o
 
--- a/hotspot/test/runtime/jsig/Test8017498.sh	Fri Jul 26 12:37:39 2013 -0700
+++ b/hotspot/test/runtime/jsig/Test8017498.sh	Wed Jul 31 08:28:18 2013 -0700
@@ -27,6 +27,7 @@
 ## @test Test8017498.sh
 ## @bug 8017498
 ## @bug 8020791
+## @bug 8021296
 ## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
 ## @run shell/timeout=30 Test8017498.sh
 ##
@@ -45,6 +46,11 @@
 case "$OS" in
   Linux)
     echo "Testing on Linux"
+    gcc_cmd=`which gcc`
+    if [ "x$gcc_cmd" == "x" ]; then
+        echo "WARNING: gcc not found. Cannot execute test." 2>&1
+        exit 0;
+    fi
     if [ "$VM_BITS" = "64" ]
     then
         MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so
@@ -64,15 +70,11 @@
 cp ${TESTSRC}${FS}*.java ${THIS_DIR}
 ${TESTJAVA}${FS}bin${FS}javac *.java
 
-gcc -DLINUX -fPIC -shared \
+$gcc_cmd -DLINUX -fPIC -shared \
     -o ${TESTSRC}${FS}libTestJNI.so \
     -I${TESTJAVA}${FS}include \
     -I${TESTJAVA}${FS}include${FS}linux \
     ${TESTSRC}${FS}TestJNI.c
-if [ $? != 0 ]
-then
-    echo "WARNING: the gcc command failed." 2>&1
-fi
 
 # run the java test in the background
 cmd="LD_PRELOAD=$MY_LD_PRELOAD \
--- a/hotspot/test/runtime/jsig/TestJNI.c	Fri Jul 26 12:37:39 2013 -0700
+++ b/hotspot/test/runtime/jsig/TestJNI.c	Wed Jul 31 08:28:18 2013 -0700
@@ -21,7 +21,6 @@
  * questions.
  */
 
-#define _GNU_SOURCE // for the definition of REG_RIP in ucontext.h
 #include <stdio.h>
 #include <jni.h>
 #include <signal.h>
@@ -32,11 +31,8 @@
 #endif
 
 void sig_handler(int sig, siginfo_t *info, ucontext_t *context) {
-    int thrNum;
 
     printf( " HANDLER (1) " );
-    // Move forward RIP to skip failing instruction
-    context->uc_mcontext.gregs[REG_RIP] += 6;
 }
 
 JNIEXPORT void JNICALL Java_TestJNI_doSomething(JNIEnv *env, jclass klass, jint val) {