changeset 3734:b55f2b8f83fd

Remove deprecated files.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 17 Dec 2011 20:34:58 +0100
parents e233f5660da4
children 61369a06f03c
files ProblemsIdeas.txt create_examples.xml doxygen.sh perf/benchmarktool.py runexamples.sh runexamplescompare.sh runscimark.sh runtradebeans.sh
diffstat 8 files changed, 0 insertions(+), 382 deletions(-) [+]
line wrap: on
line diff
--- a/ProblemsIdeas.txt	Sat Dec 17 19:59:18 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-Problems
-========
-
-* -Xcomp + synchronized method + unresolved type => deopt to bci -1
-  Example : try "runfop.sh -G:-Inline -Xcomp" should fail on the compilation of org.apache.xmlgraphics.util.Service.providers(java.lang.Class, boolean)
-  
-  The first bytecode of the method is NEW (java.lang.StringBuffer)it will deopt because java.lang.StringBuffer is not resolved, the logic in append(FixedNode) will go back until the start node, detaching the MonitorEnter from the start node and attaching the Deopt instead.
-  Deopt will now get the FrameState generated by LIRGenerator in setOperandsForLocals which is bci -1 for a synchronized method.
-
-  Can interpreter handle bci -1 for synchronized methods ? if this is the case, the corresponding assert in LIRGenerator.visitDeoptimize should be removed as bci -1 should now only be used for synchronized entry points and not for exception handling or anything else
-
-
-* Deopt caused by profiling can interfer with later optimisations
-  Example : have a look to some of the visit methods in avrora.arch.legacy.LegacyInterpreter sometimes if constructs which are used to materialize some booleans have a Deopt branch which prevents us from detecting an opportunity for a MaterilizeNode canonicalization. As long as the MaterializeNode itself doesnt get canonicalized away and in the end translates to jumps in the final assembly this doesnt really matter but it may if we optimise the emitted assembly
-
-* Canonicalization & DeadCodeElimination should play better together
-  Somtimes the graph does not get completely canonical after a CanonicalizationPhase followed by a DeadCodeEliminationPhase because DCE can transform some Phi into one of their input value because of the removal of a branch, if this transformation gives a canonicalization opportunity, it will never be used. We could apply Canonicalization followed by BCE until we reach a fixed point but that's probably not very efficient. 
-
-Ideas
-=====
-
-* Always inline 'specialization' methods
-  Example :
-  public void foo(int a) {
-      foo(a, 1); // invoke 1
-  }
-
-  public void foo(int a, int b) {
-      foo(a, b, false); // invoke 2
-  }
-
-  public void foo(int a, int b, boolean c) {
-      // ...
-  }
- 
-  Here invoke 1 and 2 should always be inlined regardless of the size of the inlined graph/method size and without increasing the inlining depth
-  specializations should always be inlined if we are in a trivial method, not only he methods with only one invoke, we shoudl also do it for exemple for methods that invoke and only do simple operations on paramteres or result
-
-
-* 'computable' slots in Framstates/debug info
-
-  Framestates/debug info will keep some values live for longer than they should because the values are needed for exemple for a very unlikely Deopt, this increases the pressure on register allocator.
-  In the current system Deopt is the unlikely/slow path so maybe we can make it a bit slower to avoid this problem and increase fast path performances.
-  An idea would be to insert an 'expression' in some slots instead of value referances, the expression would use values that have to be live at this point for program semantics reasons.
-  Expressions would then be evaluated by the runtime when the framestate values are needed. Expression operators probably have to be kept simple (non-trapping arithmetics)
-  This could be done by deopting to some deopt handler that will fixup the computable slots, this would probably require less runtime hacking. For exemple an object containing the informations necessary to fixup the framestate could be inserted in one of the framestate solts and then used by a deopt handler called in the same way than the deopt handler example.
-
-
-* Profilable expressions
-
-  Some optimizations may benefit from knowing is some assumption can be done. For exemple some loop optimisations may want to know the likelyhood of 2 values being aliased so that it can know if inserting a deopt-if-aliased guard is really beneficial.
-  This kind of information can not always be derived just from branch probabilities and it would be interesting to be able to ask the runtime to profile an expression, the simplest version would be to generate a boolean expression and get the probability for it being true.
-  This requires going through the compiler and asking for further profiling there are 2 main options here :
-   - Reprofile the method in interpreter with the new profiled expression (we may modify the method bytecode to insert a conditional branch on the expression we want to profile, thus using the classical branch probability infrastructure)
-   - insert a profiling snippet in the compiled code and ask runtime to recompile the method after N executions
-
-
-* Transform some contiguous array accesses into phis when possible
-  Example : (most probably found in scientific code, for example relaxation code)
-  
-  for (int i = 1; i < A.length - 1; i++) {
-     vm1 = A[i-1];
-     v0  = A[i];
-     vp1 = A[i+1];
-     // ...
-  }
-
-  should be transformed into
-  vm1 = A[0];
-  v0 = A[1];
-  for (int i = 0; i < A.length - 1; i++) {
-     vp1 = A[i+1];
-     // ...
-     vm1 = v0;
-     v0 = vp1;
-  }
-
-  This could be done in the context of a more advanced induction varaible analysis to be able to detect such access patterns. In this example we removed 2 array access (2 loads + 2 address computation + 2 bounds checks if not hoisted) while only adding 2 moves (phis)
-
-
-* Implement array bounds check elimination
-
-* Rematerialize only the nodes that were affected by GVN
-  This will probably require something that tracks changes to the Graph, the cost of such a tracking should be evaluated
-
-* Hints on register pressure
-
-  Sometimes we can make better decisions if we know the register pressure, it would be nice to have a way to know about it. Maybe we have register allocation on SSA we can somehow interact with it and try to lower the pressure in some areas on request?
-
-* Remove <0 check on array allocation when possible
-
-  The XIR templates for array allocation check the length argument agaisnt 0, this can be avoided if the arguent is known to be >= 0
-
-* Fuse Div/Rem that act on the same inputs
-
-  Doing it in HIR require a node with 2 outputs which means projections, maybe a special Rem node that takes only the Div as input could do : that would be only one "Projection" node
-
-* Fuse multiple conditional that use the same BooleanNode condition when doing LIRGen
-
-  Would allow to transform conditional constructs more agressively. Fuse them together or if there is a If that uses the condition, emit them in the if branches
--- a/create_examples.xml	Sat Dec 17 19:59:18 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project default="create_run_jar" name="Create Runnable Jar for Project com.oracle.max.graal.examples">
-    <!--this file was created by Eclipse Runnable JAR Export Wizard-->
-    <!--ANT 1.7 is required                                        -->
-    <target name="create_run_jar">
-        <jar destfile="./examples.jar" filesetmanifest="mergewithoutmain">
-            <manifest>
-                <attribute name="Main-Class" value="com.oracle.max.graal.examples.Main"/>
-                <attribute name="Class-Path" value="."/>
-            </manifest>
-            <fileset dir="./graal/com.oracle.max.graal.examples/bin"/>
-        </jar>
-    </target>
-</project>
--- a/doxygen.sh	Sat Dec 17 19:59:18 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-if [ -z "${MAXINE}" ]; then
-  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
-
-# Resolve location of this script
-me="${BASH_SOURCE[0]}"
-while [ -h "$me" ]; do
-    me=`readlink -e "$me"`
-done
-script_home=$(cd `dirname $me`; pwd)/doc/doxygen
-
-echo "script home: $script_home"
-echo "removing temp dirs"
-
-rm -r $script_home/src
-rm -r $script_home/html
-rm -r $script_home/latex
-
-echo "collecting sources"
-mkdir -p $script_home/src
-cp -r $GRAAL/graal/GraalCompiler/src/* $script_home/src/
-cp -r $GRAAL/graal/GraalGraph/src/* $script_home/src/
-cp -r $MAXINE/CRI/src/* $script_home/src/
-
-echo "preparing sources"
-find $script_home/src/ -type f -print0 | xargs -0 sed -i 's/{@code \([^}]*\)}/\1/g'
-find $script_home/src/ -type f -print0 | xargs -0 sed -i 's/{@code/ /g'
-
-pushd $script_home
-echo "running doxygen"
-doxygen ../graal.doxy > out.txt 2> err.txt
-cat err.txt | grep -v "unable to resolve link" | grep -v "expected whitespace" | grep -v ACCESSOR | grep -v "not documented" > errors.txt
-rm err.txt
-popd
--- a/perf/benchmarktool.py	Sat Dec 17 19:59:18 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-import subprocess
-import os
-import re
-import sys
-import argparse
-
-DEFAULT_DACAPO_OPTS = " -XX:MaxPermSize=512m -Xms1g -Xmx2g "
-DEFAULT_SCIMARK_OPTS = " -Xms32m -Xmx100m "
-
-def runBash(cmd):
-    p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-    return p.stdout
-
-def s2msString(floatString):
-    return str(round(float(floatString)*1000))
-
-# Raw String Notation (r"") : \ instead of \\
-graalTime = re.compile(r"Total compilation time\s+:\s+([0-9]+\.[0-9]+) s")
-graalSubTime = re.compile(r"([a-zA-Z0-9_ ]+)\s+:\s+([0-9]+\.[0-9]+) s \([0-9 ][0-9]\.[0-9]{2}%\)")
-
-def matchGraalTime(string, csvOutput, csvOutputLine, writeHeaderAt):
-    match1 = graalTime.search(string)
-    match2 = graalSubTime.search(string)
-    if match1:
-        if csvOutputLine == writeHeaderAt:
-            csvOutput[0].append('graal total')
-        print('Graal total time: '+ s2msString(match1.group(1)))
-        csvOutput[csvOutputLine].append(s2msString(match1.group(1)))
-    elif match2:
-        if csvOutputLine == writeHeaderAt:
-            csvOutput[0].append(match2.group(1).strip())
-        print('Graal specific time: '+match2.group(1)+': '+s2msString(match2.group(2)))
-        csvOutput[csvOutputLine].append(s2msString(match2.group(2)))
-    else:
-        print('# '+string)
-
-def writeout(outputFile, csvOutput):
-    for csvLine in csvOutput :
-        outputFile.write(';'.join(csvLine)+';'+os.linesep)
-
-def main():
-    # Check for environment variables
-    if os.getenv('JDK7') is None:
-        print('Environment variable JDK7 is not defined.')
-        return 1
-    if os.getenv('DACAPO') is None:
-        print('Environment variable DACAPO is not defined. It must point to a directory with the DaCapo benchmark jar.')
-        return 1
-    if os.getenv('SCIMARK') is None:
-        print('Environment variable SCIMARK is not defined. It must point to a directory with the SciMark benchmark jar.')
-        return 1
-    if os.getenv('REFERENCE_JDK') is None:
-        print('Environment variable REFERENCE_JDK is not defined.')
-        return 1
-    
-    # Option parsing
-    parser = argparse.ArgumentParser(description='Automated DaCapo and Scimark bechmarks')
-    parser.add_argument('-a', '-all', help='run all benchmarks for all compilers', action='store_true')
-    parser.add_argument('-c', type=str, help='compiler to use', default='graal', choices=['client', 'server', 'graal'], required=False)
-    parser.add_argument('-n', type=int, help='number of DaCapo benchmarks to run', default=10)
-    parser.add_argument('-o', type=str, help='graalVM options(quoted!)', default='')
-    parser.add_argument('-runonly', type=str, help='run specified benchmark only', default='all')
-    options = parser.parse_args()
-    compilerFlags = {'graal' : '-graal -G:+Time -XX:-GraalBailoutIsFatal -G:QuietBailout ',
-        'client' : '-client',
-        'server' : '-server'}
-
-    if options.a: 
-        compilers = ['graal', 'client', 'server']
-    else:
-        compilers = [options.c]
-    
-    for compiler in compilers:
-    
-        outputFile = open(compiler+'.csv', 'w')
-    
-        # DaCapo Benchmarks
-        if compiler == 'graal':
-            vm = os.environ['JDK7']
-        else :
-            vm = os.environ['REFERENCE_JDK']
-        
-        cmd = '"' + vm + '/bin/java" ' + compilerFlags[compiler] + ' -d64 ' + DEFAULT_DACAPO_OPTS + options.o + ' -classpath ' + \
-            os.environ['DACAPO'] + '/dacapo-9.12-bach.jar Harness -n ' + str(options.n) + ' '
-        benchmarks = runBash('java -jar ' + os.environ['DACAPO'] + '/dacapo-9.12-bach.jar -l').read().decode().split(' ')
-    
-        benchmarkTime = re.compile(r"===== DaCapo 9\.12 ([a-zA-Z0-9_]+) ((PASSED)|(completed warmup [0-9]+)) in ([0-9]+) msec =====")
-	print('command: ' + cmd)
-    
-        csvOutput = [['benchmark', 'type', 'time']]
-        csvOutputLine = 0
-        for benchmark in benchmarks:
-            if options.runonly != 'all' and benchmark != options.runonly:
-                continue
-            nRuns = 0
-            dcOutput = runBash(cmd + benchmark)
-            while True:
-                line = dcOutput.readline().decode()
-                if not line:
-                    break
-                line = line.strip()
-                match = benchmarkTime.search(line)
-                if match:
-                    csvOutputLine = csvOutputLine + 1
-                    nRuns = nRuns + 1
-                    csvOutput.append(list())
-                    csvOutput[csvOutputLine].append(str(nRuns))
-                    print('Benchmark type: '+match.group(1))
-                    print('Benchmark time: '+match.group(5))
-                    csvOutput[csvOutputLine].append(match.group(1))
-                    csvOutput[csvOutputLine].append(match.group(5))
-                else:
-                    matchGraalTime(line, csvOutput, csvOutputLine, options.n)
-                    
-            if nRuns < options.n:
-                csvOutputLine = csvOutputLine + (options.n - nRuns)
-                for i in range(options.n - nRuns):
-                    csvOutput.append([str(nRuns + i), benchmark, '0'])
-    
-        writeout(outputFile, csvOutput)
-    
-        if options.runonly != 'all' and options.runonly != 'scimark':
-            outputFile.close()
-            return 0
-        
-        # Scimark Benchmarks
-        writeout(outputFile, [['']])
-        cmd = '"' + vm + '/bin/java" ' + compilerFlags[compiler] + ' -d64 ' + DEFAULT_SCIMARK_OPTS + options.o + \
-            ' -Xbootclasspath/a:' + os.environ['SCIMARK'] + '/scimark2lib.jar jnt.scimark2.commandline'
-    
-        benchmarkScore = re.compile(r"([a-zA-Z0-9_\(\),= ]+):\s+([0-9]+\.[0-9]+)$")
-    
-        csvOutput = [['run'],[]]
-        scOutput = runBash(cmd)
-        while True:
-            line = scOutput.readline().decode()
-            if not line:
-                break
-            line = line.strip()
-            match = benchmarkScore.search(line)
-            if match:
-                print('Scimark '+match.group(1)+' score: '+match.group(2))
-                csvOutput[0].append(match.group(1).strip())
-                csvOutput[1].append(match.group(2))
-            else:
-                matchGraalTime(line,csvOutput, 1, 1)
-    
-        writeout(outputFile, csvOutput)
-        outputFile.close()
-        
-    return 0
-
-#This idiom means the below code only runs when executed from command line
-if __name__ == '__main__':
-    sys.exit(main())
--- a/runexamples.sh	Sat Dec 17 19:59:18 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#!/bin/bash
-if [ -z "${JDK7}" ]; then
-  echo "JDK7 is not defined."
-  exit 1;
-fi
-if [ -z "${MAXINE}" ]; then
-  echo "MAXINE 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;
-fi
-TEST=$1
-shift
-ant -f create_examples.xml
-COMMAND="${JDK7}/bin/java -graal -Xms1g -Xmx2g -esa -G:Extend -Xcomp -XX:CompileOnly=examples $* -jar examples.jar $TEST"
-echo $COMMAND
-$COMMAND
--- a/runexamplescompare.sh	Sat Dec 17 19:59:18 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#!/bin/bash
-if [ -z "${JDK7}" ]; then
-  echo "JDK7 is not defined."
-  exit 1;
-fi
-if [ -z "${MAXINE}" ]; then
-  echo "MAXINE 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;
-fi
-ant -f create_examples.xml
-COMMAND="${JDK7}/bin/java -graal -Xms1g -Xmx2g -esa -G:Extend -Xcomp -XX:CompileOnly=examples $* -jar examples.jar"
-echo $COMMAND
-$COMMAND
-COMMAND="${JDK7}/bin/java -client -d64 -Xms1g -Xmx2g -esa -Xcomp -XX:CompileOnly=examples $* -jar examples.jar"
-echo $COMMAND
-$COMMAND
-COMMAND="${JDK7}/bin/java -server -d64 -Xms1g -Xmx2g -esa -Xcomp -XX:CompileOnly=examples $* -jar examples.jar"
-echo $COMMAND
-$COMMAND
--- a/runscimark.sh	Sat Dec 17 19:59:18 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#!/bin/bash
-if [ -z "${JDK7}" ]; then
-  echo "JDK7 is not defined."
-  exit 1;
-fi
-if [ -z "${MAXINE}" ]; then
-  echo "MAXINE 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;
-fi
-${JDK7}/jre/bin/java -graal -Xms256m -Xmx512m -Xbootclasspath/a:${SCIMARK}/scimark2lib.jar $@ jnt.scimark2.commandline
--- a/runtradebeans.sh	Sat Dec 17 19:59:18 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#!/bin/bash
-if [ -z "${JDK7}" ]; then
-  echo "JDK7 is not defined."
-  exit 1;
-fi
-if [ -z "${MAXINE}" ]; then
-  echo "MAXINE 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;
-fi
-COMMAND="${JDK7}/bin/java -graal -Xms1g -Xmx2g -esa -classpath ${DACAPO}/dacapo-9.12-bach.jar -XX:-GraalBailoutIsFatal -G:-QuietBailout $* Harness --preserve -n 20 tradebeans"
-echo $COMMAND
-$COMMAND