changeset 3584:cda0630a8640

Remove GRAAL env var requirement; Add ResourceMarks in code installer to avoid leaks
author Gilles Duboscq <gilles.m.duboscq@gmail.com>
date Thu, 06 Oct 2011 17:11:04 +0200
parents 953034d78b64
children f3e823ead645
files runavrora.sh runbatik.sh runbootstrap.sh rundacapo.sh runeclipse.sh runexamples.sh runexamplescompare.sh runfilter.sh runfop.sh runh2.sh runjython.sh runlusearch.sh runpmd.sh runscimark.sh runtests.sh runtradebeans.sh runxalan.sh src/share/vm/graal/graalVMEntries.cpp
diffstat 18 files changed, 4 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/runavrora.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runavrora.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runbatik.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runbatik.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runbootstrap.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runbootstrap.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,8 +7,4 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 ${JDK7}/bin/java -graal $* -version 
--- a/rundacapo.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/rundacapo.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runeclipse.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runeclipse.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a Maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a Maxine repository directory."
-  exit 1;
-fi
 if [ ! -f "${DACAPO}/dacapo-9.12-bach.jar" ]; then
   echo "DACAPO must point to a directory containing dacapo-9.12-bach.jar"
   exit 1;
--- a/runexamples.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runexamples.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runexamplescompare.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runexamplescompare.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runfilter.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runfilter.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ $# -lt 1 ]; then
   echo "You must provide at least a filter option"
   exit 1;
--- a/runfop.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runfop.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runh2.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runh2.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runjython.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runjython.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runlusearch.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runlusearch.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runpmd.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runpmd.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runscimark.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runscimark.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${SCIMARK}" ]; then
   echo "SCIMARK is not defined. It must point to a directory with the SciMark benchmark jar."
   exit 1;
--- a/runtests.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runtests.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,9 +7,5 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 TESTDIR=${MAXINE}/com.oracle.max.vm/test
 ${JDK7}/bin/java -graal -ea -esa -Xcomp -XX:+PrintCompilation -XX:CompileOnly=jtt $@ -Xbootclasspath/p:"${MAXINE}/com.oracle.max.vm/bin" -Xbootclasspath/p:"${MAXINE}/com.oracle.max.base/bin" $@ test.com.sun.max.vm.compiler.JavaTester -verbose=1 -gen-run-scheme=false -run-scheme-package=all ${TESTDIR}/jtt/bytecode ${TESTDIR}/jtt/except ${TESTDIR}/jtt/jdk ${TESTDIR}/jtt/hotpath ${TESTDIR}/jtt/jdk ${TESTDIR}/jtt/lang ${TESTDIR}/jtt/loop ${TESTDIR}/jtt/micro ${TESTDIR}/jtt/optimize ${TESTDIR}/jtt/reflect ${TESTDIR}/jtt/threads ${TESTDIR}/jtt/hotspot
--- a/runtradebeans.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runtradebeans.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/runxalan.sh	Tue Sep 27 15:24:23 2011 +0200
+++ b/runxalan.sh	Thu Oct 06 17:11:04 2011 +0200
@@ -7,10 +7,6 @@
   echo "MAXINE is not defined. It must point to a maxine repository directory."
   exit 1;
 fi
-if [ -z "${GRAAL}" ]; then
-  echo "GRAAL is not defined. It must point to a maxine repository directory."
-  exit 1;
-fi
 if [ -z "${DACAPO}" ]; then
   echo "DACAPO is not defined. It must point to a Dacapo benchmark directory."
   exit 1;
--- a/src/share/vm/graal/graalVMEntries.cpp	Tue Sep 27 15:24:23 2011 +0200
+++ b/src/share/vm/graal/graalVMEntries.cpp	Thu Oct 06 17:11:04 2011 +0200
@@ -979,8 +979,10 @@
   if (CURRENT_ENV == NULL) {
     Arena arena;
     ciEnv env(&arena);
+    ResourceMark rm;
     CodeInstaller installer(JNIHandles::resolve(targetMethod));
   } else {
+    ResourceMark rm;
     CodeInstaller installer(JNIHandles::resolve(targetMethod));
   }
 }
@@ -992,8 +994,10 @@
   if (CURRENT_ENV == NULL) {
     Arena arena;
     ciEnv env(&arena);
+    ResourceMark rm;
     CodeInstaller installer(JNIHandles::resolve(targetMethod), id);
   } else {
+    ResourceMark rm;
     CodeInstaller installer(JNIHandles::resolve(targetMethod), id);
   }
   return id;