changeset 3713:d6a0c46a73b2

Add all DaCapo benchmarks, allow batch execution of all DaCapo benchmarks, add -d flag to start HotSpot under the debugger
author Christian Wimmer <christian.wimmer@oracle.com>
date Tue, 13 Dec 2011 21:16:50 -0800
parents 4e037604f6ee
children b648304ba4ff
files pytools/commands.py pytools/gl.py
diffstat 2 files changed, 29 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/pytools/commands.py	Mon Dec 05 18:15:25 2011 -0800
+++ b/pytools/commands.py	Tue Dec 13 21:16:50 2011 -0800
@@ -83,26 +83,34 @@
     """run a DaCapo benchmark"""
     
     benchmarks = {
-        'avrora': ['--preserve', '-n', '20'],
-        'batik': ['-n', '20'],
-        'eclipse': ['-n', '20'],
-        'fop': ['-n', '100'],
-        'h2': ['-n', '10'],
-        'jython': ['-n', '10'],
+        'avrora': ['-n', '5'],
+        'batik': ['-n', '5'],
+        'eclipse': ['-n', '5'],
+        'fop': ['-n', '5'],
+        'h2': ['-n', '5'],
+        'jython': ['-n', '5'],
+        'luindex': ['-n', '5'],
         'lusearch': ['-n', '5'],
-        'pmd': ['-n', '10'],
-        'tradebeans': ['-n', '20'],
-        'xalan': ['-n', '20'],
+        'pmd': ['-n', '5'],
+        'sunflow': ['-n', '5'],
+        'tomcat': ['-n', '5'],
+        'tradebeans': ['-n', '5'],
+        'tradesoap': ['-n', '5'],
+        'xalan': ['-n', '5'],
     }
     
     if len(args) == 0:
-        env.abort('which benchmark?\nselect one of: ' + str(benchmarks.keys()))
-    bm = args[0]
-    config = benchmarks.get(bm)
-    if (config is None):
-        env.abort('unknown benchmark: ' + bm + '\nselect one of: ' + str(benchmarks.keys()))
-    args = args[1:]
-    return env.run_dacapo(args + ['Harness'] + config + [bm])
+        args = args[0:]
+        for bm in benchmarks:
+            env.run_dacapo(args + ['Harness', '-n', '2'] + [bm])
+        return 
+    else:
+        bm = args[0]
+        config = benchmarks.get(bm)
+        if (config is None):
+            env.abort('unknown benchmark: ' + bm + '\nselect one of: ' + str(benchmarks.keys()))
+        args = args[1:]
+        return env.run_dacapo(args + ['Harness'] + config + [bm])
     
 def tests(env, args):
     """run a selection of the Maxine JTT tests in Graal"""
--- a/pytools/gl.py	Mon Dec 05 18:15:25 2011 -0800
+++ b/pytools/gl.py	Tue Dec 13 21:16:50 2011 -0800
@@ -61,6 +61,7 @@
         ArgumentParser.__init__(self, prog='gl')
     
         self.add_argument('-v', action='store_true', dest='verbose', help='enable verbose output')
+        self.add_argument('-d', action='store_true', dest='java_dbg', help='make Java processes wait on port 8000 for a debugger')
         self.add_argument('--dacapo', help='path to DaCapo 9.12 jar file', metavar='<path>')
         self.add_argument('--jdk7', help='JDK7 in which the GraalVM will be installed', metavar='<path>')
         self.add_argument('-M', dest='maxine', help='path to Maxine code base', metavar='<path>')
@@ -114,7 +115,7 @@
             self.abort('Need to specify DaCapo jar with --dacapo option or DACAPO environment variable')
         if not isfile(self.dacapo) or not self.dacapo.endswith('.jar'):
             self.abort('Specified DaCapo jar file does not exist or is not a jar file: ' + self.dacapo)
-        return self.run_vm(['-Xms1g', '-Xmx2g', '-esa', '-XX:-GraalBailoutIsFatal', '-G:-QuietBailout', '-cp', self.dacapo] + args)
+        return self.run_vm(['-Xms1g', '-Xmx2g', '-esa', '-cp', self.dacapo] + args)
 
     def run_vm(self, args, vm='-graal'):
         if self.maxine is None:
@@ -123,6 +124,9 @@
         if not exists(join(self.maxine, 'com.oracle.max.graal.hotspot', 'bin', 'com', 'oracle', 'max', 'graal', 'hotspot', 'VMEntriesNative.class')):
             self.abort('Maxine code base path specified -M option or MAXINE environment variable does not contain com.oracle.max.graal.hotspot/bin/com/oracle/max/graal/hotspot/VMEntriesNative.class: ' + self.maxine)
             
+        if self.java_dbg:
+            args = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000'] + args
+
         os.environ['MAXINE'] = self.maxine
         exe = join(self.jdk7, 'bin', self.exe('java'))
         return self.run([exe, vm] + args)