# HG changeset patch # User Doug Simon # Date 1364247485 -3600 # Node ID 95e21e0353635e76469671f634a8e0f93a3d12dc # Parent eb0282efad36c57593b82a24f148248fa4085b32# Parent b2161263e9f2de7b8510f0780d9775ec870656b1 Merge. diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.api.meta.test/src/com/oracle/graal/api/meta/test/TestMetaAccessProvider.java --- a/graal/com.oracle.graal.api.meta.test/src/com/oracle/graal/api/meta/test/TestMetaAccessProvider.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.api.meta.test/src/com/oracle/graal/api/meta/test/TestMetaAccessProvider.java Mon Mar 25 22:38:05 2013 +0100 @@ -116,10 +116,6 @@ } } - static { - System.out.println(classes.size() + " classes"); - } - public static final List constants = new ArrayList<>(); static { for (Field f : Constant.class.getDeclaredFields()) { @@ -149,10 +145,6 @@ constants.add(Constant.forObject(42)); } - static { - System.out.println(constants.size() + " constants"); - } - @Test public void lookupJavaTypeTest() { for (Class c : classes) { diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.api.test/src/com/oracle/graal/api/test/GraalAPITest.java --- a/graal/com.oracle.graal.api.test/src/com/oracle/graal/api/test/GraalAPITest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.api.test/src/com/oracle/graal/api/test/GraalAPITest.java Mon Mar 25 22:38:05 2013 +0100 @@ -33,12 +33,10 @@ @Test public void testRuntimeAvailable() { assertNotNull(Graal.getRuntime()); - System.out.println(Graal.getRuntime().getClass()); } @Test public void testRuntimeNamed() { assertNotNull(Graal.getRuntime().getName()); - System.out.println(Graal.getRuntime().getName()); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.compiler.ptx.test/src/com/oracle/graal/compiler/ptx/test/BasicPTXTest.java --- a/graal/com.oracle.graal.compiler.ptx.test/src/com/oracle/graal/compiler/ptx/test/BasicPTXTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.compiler.ptx.test/src/com/oracle/graal/compiler/ptx/test/BasicPTXTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -61,7 +61,7 @@ return array[0]; } - private void test(String snippet) { + private CompilationResult test(String snippet) { StructuredGraph graph = parse(snippet); Debug.dump(graph, "Graph"); TargetDescription target = new TargetDescription(new PTX(), true, 1, 0, true); @@ -72,14 +72,13 @@ phasePlan.addPhase(PhasePosition.AFTER_PARSING, new PTXPhase()); new PTXPhase().apply(graph); CompilationResult result = GraalCompiler.compileMethod(runtime, ptxBackend, target, graph.method(), graph, null, phasePlan, OptimisticOptimizations.NONE, new SpeculationLog()); - System.out.println("result=" + result); + return result; } private static class PTXPhase extends Phase { @Override protected void run(StructuredGraph graph) { - System.out.println("PTX phase"); for (LocalNode local : graph.getNodes(LocalNode.class)) { if (local.kind() == Kind.Object) { local.setStamp(StampFactory.declaredNonNull(local.objectStamp().type())); @@ -88,4 +87,10 @@ } } + + public static void main(String[] args) { + BasicPTXTest basicPTXTest = new BasicPTXTest(); + System.out.println("testAddSnippet: \n" + new String(basicPTXTest.test("testAddSnippet").getTargetCode())); + System.out.println("testArraySnippet: \n" + new String(basicPTXTest.test("testArraySnippet").getTargetCode())); + } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXBackend.java --- a/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXBackend.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXBackend.java Mon Mar 25 22:38:05 2013 +0100 @@ -86,7 +86,6 @@ Signature signature = method.getSignature(); for (int i = 0; i < signature.getParameterCount(false); i++) { - System.err.println(i + ": " + signature.getParameterKind(i)); String param = ".param .u32 param" + i; codeBuffer.emitString(param); } @@ -104,8 +103,5 @@ // Emit the epilogue codeBuffer.emitString0("}"); codeBuffer.emitString(""); - - byte[] data = codeBuffer.copyData(0, codeBuffer.position()); - System.err.println(new String(data)); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Mon Mar 25 22:38:05 2013 +0100 @@ -152,7 +152,9 @@ // to be valid for the entire run of the VM. Assumptions assumptions = new Assumptions(false); ReplacementsInstaller installer = new HotSpotReplacementsInstaller(runtime, assumptions, runtime.getGraalRuntime().getTarget()); - GraalMethodSubstitutions.installIntrinsics(installer); + for (ReplacementsProvider provider : ServiceLoader.loadInstalled(ReplacementsProvider.class)) { + provider.installReplacements(installer); + } runtime.installReplacements(graalRuntime.getBackend(), installer, assumptions); } }); diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/OnStackReplacementPhase.java Mon Mar 25 22:38:05 2013 +0100 @@ -79,16 +79,17 @@ NodeIterable osrNodes = graph.getNodes(EntryMarkerNode.class); osr = osrNodes.first(); if (osr == null) { - throw new BailoutException("no OnStackReplacementNode generated"); + throw new BailoutException("No OnStackReplacementNode generated"); } if (osrNodes.count() > 1) { - throw new GraalInternalError("multiple OnStackReplacementNodes generated"); + // this can happen with JSR inlining + throw new BailoutException("Multiple OnStackReplacementNodes generated"); } if (osr.stateAfter().locksSize() != 0) { - throw new BailoutException("osr with locks not supported"); + throw new BailoutException("OSR with locks not supported"); } if (osr.stateAfter().stackSize() != 0) { - throw new BailoutException("osr with stack entries not supported: " + osr.stateAfter().toString(Verbosity.Debugger)); + throw new BailoutException("OSR with stack entries not supported: " + osr.stateAfter().toString(Verbosity.Debugger)); } LoopEx osrLoop = null; LoopsData loops = new LoopsData(graph); diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Mon Mar 25 22:38:05 2013 +0100 @@ -1128,7 +1128,7 @@ frameState.pushReturn(resultType, result); return invoke; } else { - ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) handleException(null, bci()); + DispatchBeginNode exceptionEdge = handleException(null, bci()); InvokeWithExceptionNode invoke = currentGraph.add(new InvokeWithExceptionNode(callTarget, exceptionEdge, bci())); ValueNode result = append(invoke); frameState.pushReturn(resultType, result); diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/except/Except_Locals.java --- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/except/Except_Locals.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/except/Except_Locals.java Mon Mar 25 22:38:05 2013 +0100 @@ -37,7 +37,6 @@ x = 2; b.toString(); } catch (NullPointerException e) { - // System.out.println(x); return x; } return -1; diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_life.java --- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_life.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_life.java Mon Mar 25 22:38:05 2013 +0100 @@ -41,7 +41,6 @@ for (int row = 0; row < rows; ++row) { for (int col = 0; col < cols; ++col) { boolean value = cell(row, col); - // System.out.print(value ? "1" : "0"); sum += (row * 15223242 + col * 21623234) ^ ((value ? 1 : 0) * 15323142); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test6823354.java --- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test6823354.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test6823354.java Mon Mar 25 22:38:05 2013 +0100 @@ -166,13 +166,11 @@ } static void check(int value, int result, int expected) { - //System.out.println(value + ": " + result + ", " + expected); if (result != expected) throw new InternalError(value + " failed: " + result + " != " + expected); } static void check(long value, long result, long expected) { - //System.out.println(value + ": " + result + ", " + expected); if (result != expected) throw new InternalError(value + " failed: " + result + " != " + expected); } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/jdk/Thread_setName.java --- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/jdk/Thread_setName.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/jdk/Thread_setName.java Mon Mar 25 22:38:05 2013 +0100 @@ -37,10 +37,6 @@ return name2; } - public static void main(String[] args) throws Exception { - System.out.println(test("abc")); - } - @Test public void run0() throws Throwable { runTest("test", "abc"); diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/NCE_FlowSensitive05.java --- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/NCE_FlowSensitive05.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/NCE_FlowSensitive05.java Mon Mar 25 22:38:05 2013 +0100 @@ -22,6 +22,8 @@ */ package com.oracle.graal.jtt.optimize; +import java.io.*; + import com.oracle.graal.test.*; import com.oracle.graal.jtt.*; @@ -29,11 +31,13 @@ */ public class NCE_FlowSensitive05 extends JTTTest { + private static PrintStream ps = new PrintStream(new ByteArrayOutputStream()); + public static String test(Object arg) { // An artificial loop to trigger iterative NCE. while (arg != null) { - System.out.println(arg); + ps.println(arg); } // The upcast must still include the null check. diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/TypeCastElem.java --- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/TypeCastElem.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/TypeCastElem.java Mon Mar 25 22:38:05 2013 +0100 @@ -135,10 +135,6 @@ return result; } - public static void main(String[] args) { - System.out.println(test(10, 13, 25)); - } - @Test public void run0() throws Throwable { runTest("test", 10, 13, 25); diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InvokeWithExceptionNode.java Mon Mar 25 22:38:05 2013 +0100 @@ -35,7 +35,7 @@ public class InvokeWithExceptionNode extends ControlSplitNode implements Node.IterableNodeType, Invoke, MemoryCheckpoint, LIRLowerable { @Successor private BeginNode next; - @Successor private ExceptionObjectNode exceptionEdge; + @Successor private DispatchBeginNode exceptionEdge; @Input private final CallTargetNode callTarget; @Input private FrameState stateAfter; private final int bci; @@ -43,7 +43,7 @@ private boolean useForInlining; private double inliningRelevance; - public InvokeWithExceptionNode(CallTargetNode callTarget, ExceptionObjectNode exceptionEdge, int bci) { + public InvokeWithExceptionNode(CallTargetNode callTarget, DispatchBeginNode exceptionEdge, int bci) { super(callTarget.returnStamp()); this.exceptionEdge = exceptionEdge; this.bci = bci; @@ -53,11 +53,11 @@ this.inliningRelevance = Double.NaN; } - public ExceptionObjectNode exceptionEdge() { + public DispatchBeginNode exceptionEdge() { return exceptionEdge; } - public void setExceptionEdge(ExceptionObjectNode x) { + public void setExceptionEdge(DispatchBeginNode x) { updatePredecessor(exceptionEdge, x); exceptionEdge = x; } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Mon Mar 25 22:38:05 2013 +0100 @@ -448,7 +448,7 @@ PhiNode exceptionObjectPhi = null; if (invoke instanceof InvokeWithExceptionNode) { InvokeWithExceptionNode invokeWithException = (InvokeWithExceptionNode) invoke; - ExceptionObjectNode exceptionEdge = invokeWithException.exceptionEdge(); + ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) invokeWithException.exceptionEdge(); exceptionMerge = graph.add(new MergeNode()); exceptionMerge.setProbability(exceptionEdge.probability()); @@ -484,7 +484,7 @@ // replace the invoke exception edge if (invoke instanceof InvokeWithExceptionNode) { InvokeWithExceptionNode invokeWithExceptionNode = (InvokeWithExceptionNode) invoke; - ExceptionObjectNode exceptionEdge = invokeWithExceptionNode.exceptionEdge(); + ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) invokeWithExceptionNode.exceptionEdge(); exceptionEdge.replaceAtUsages(exceptionObjectPhi); exceptionEdge.setNext(null); GraphUtil.killCFG(invokeWithExceptionNode.exceptionEdge()); @@ -656,7 +656,7 @@ assert exceptionMerge != null && exceptionObjectPhi != null; InvokeWithExceptionNode invokeWithException = (InvokeWithExceptionNode) invoke; - ExceptionObjectNode exceptionEdge = invokeWithException.exceptionEdge(); + ExceptionObjectNode exceptionEdge = (ExceptionObjectNode) invokeWithException.exceptionEdge(); FrameState stateAfterException = exceptionEdge.stateAfter(); ExceptionObjectNode newExceptionEdge = (ExceptionObjectNode) exceptionEdge.copyWithInputs(); @@ -1063,7 +1063,7 @@ if (unwindNode != null) { assert unwindNode.predecessor() != null; assert invokeWithException.exceptionEdge().successors().count() == 1; - ExceptionObjectNode obj = invokeWithException.exceptionEdge(); + ExceptionObjectNode obj = (ExceptionObjectNode) invokeWithException.exceptionEdge(); stateAtExceptionEdge = obj.stateAfter(); UnwindNode unwindDuplicate = (UnwindNode) duplicates.get(unwindNode); obj.replaceAtUsages(unwindDuplicate.exception()); diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/MonitorTest.java --- a/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/MonitorTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/MonitorTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -174,8 +174,6 @@ } public static String copyObj(Chars src, Chars dst, int n) { - System.out.println(Thread.currentThread().getName() + " reps=" + n + ", src.length=" + src.data.length); - int total = 0; for (int j = 0; j < n; j++) { for (int i = 0; i < src.data.length; i++) { synchronized (src) { @@ -183,20 +181,16 @@ synchronized (src) { synchronized (dst) { dst.data[i] = src.data[i]; - total++; } } } } } } - System.out.println(Thread.currentThread().getName() + " total " + total); return new String(dst.data); } public static String copyArr(char[] src, char[] dst, int n) { - System.out.println(Thread.currentThread().getName() + " reps=" + n + ", src.length=" + src.length); - int total = 0; for (int j = 0; j < n; j++) { for (int i = 0; i < src.length; i++) { synchronized (src) { @@ -204,14 +198,12 @@ synchronized (src) { synchronized (dst) { dst[i] = src[i]; - total++; } } } } } } - System.out.println(Thread.currentThread().getName() + " total " + total); return new String(dst); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.replacements/src/META-INF/services/com.oracle.graal.replacements.ReplacementsProvider --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.replacements/src/META-INF/services/com.oracle.graal.replacements.ReplacementsProvider Mon Mar 25 22:38:05 2013 +0100 @@ -0,0 +1,1 @@ +com.oracle.graal.replacements.GraalMethodSubstitutions diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraalMethodSubstitutions.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraalMethodSubstitutions.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/GraalMethodSubstitutions.java Mon Mar 25 22:38:05 2013 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,9 +27,9 @@ /** * Method substitutions that are VM-independent. */ -public class GraalMethodSubstitutions { +public class GraalMethodSubstitutions implements ReplacementsProvider { - public static void installIntrinsics(ReplacementsInstaller installer) { + public void installReplacements(ReplacementsInstaller installer) { if (GraalOptions.Intrinsify) { installer.installSubstitutions(MathSubstitutionsX86.class); installer.installSubstitutions(DoubleSubstitutions.class); diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsProvider.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsProvider.java Mon Mar 25 22:38:05 2013 +0100 @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.graal.replacements; + +/** + * Interface for service providers that install replacements into the compiler. + */ +public interface ReplacementsProvider { + + void installReplacements(ReplacementsInstaller installer); +} diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/AbstractTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/AbstractTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/AbstractTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -57,7 +57,7 @@ PrintStream origErr = System.err; System.setErr(printer); - SimpleLanguage.run(in, printer, REPEATS, true); + SimpleLanguage.run(in, printer, REPEATS, false); System.setErr(origErr); Assert.assertEquals(repeat(concat(expectedOutput), REPEATS), new String(out.toByteArray())); diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/AddTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/AddTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/AddTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -51,6 +51,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/ComparisonTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/ComparisonTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/ComparisonTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -51,6 +51,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/DivTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/DivTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/DivTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -45,6 +45,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/LoopPrintTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/LoopPrintTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/LoopPrintTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -43,6 +43,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/LoopTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/LoopTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/LoopTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -43,6 +43,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/MulTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/MulTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/MulTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -45,6 +45,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SubTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SubTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SubTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -45,6 +45,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SumTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SumTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SumTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -45,6 +45,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/TernaryTest.java --- a/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/TernaryTest.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/TernaryTest.java Mon Mar 25 22:38:05 2013 +0100 @@ -47,6 +47,6 @@ @Test public void test() { - executeSL(INPUT, OUTPUT, true); + executeSL(INPUT, OUTPUT, false); } } diff -r eb0282efad36 -r 95e21e035363 graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SimpleLanguage.java --- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SimpleLanguage.java Mon Mar 25 22:37:18 2013 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SimpleLanguage.java Mon Mar 25 22:38:05 2013 +0100 @@ -36,7 +36,9 @@ } public static void run(InputStream input, PrintStream printOutput, int repeats, boolean log) { - System.out.printf("== running on %s\n", Truffle.getRuntime().getName()); + if (log) { + System.out.printf("== running on %s\n", Truffle.getRuntime().getName()); + } NodeFactory factory = new NodeFactory(printOutput); diff -r eb0282efad36 -r 95e21e035363 mx/commands.py --- a/mx/commands.py Mon Mar 25 22:37:18 2013 +0100 +++ b/mx/commands.py Mon Mar 25 22:38:05 2013 +0100 @@ -1025,6 +1025,8 @@ vm = _vm if len(args) is 0: args = ['all'] + + vmArgs = [arg for arg in args if arg.startswith('-')] def benchmarks_in_group(group): prefix = group + ':' @@ -1069,7 +1071,7 @@ benchmarks += [sanitycheck.getSPECjbb2013()] for test in benchmarks: - for (groupName, res) in test.bench(vm).items(): + for (groupName, res) in test.bench(vm, opts=vmArgs).items(): group = results.setdefault(groupName, {}) group.update(res) mx.log(json.dumps(results)) diff -r eb0282efad36 -r 95e21e035363 mxtool/mx --- a/mxtool/mx Mon Mar 25 22:37:18 2013 +0100 +++ b/mxtool/mx Mon Mar 25 22:38:05 2013 +0100 @@ -37,14 +37,27 @@ exit 1 fi -python </dev/null 2>&1 +if [ $? -eq 0 ]; then + python_exe=python2.7 +else + type python2 > /dev/null 2>&1 + if [ $? -eq 0]; then + python_exe=python2 + else + python_exe=python + fi +fi + +$python_exe <', d.path