added another inlining test
authorDietmar Maurer <dietmar@mono-cvs.ximian.com>
Wed, 14 May 2003 13:14:24 +0000 (13:14 -0000)
committerDietmar Maurer <dietmar@mono-cvs.ximian.com>
Wed, 14 May 2003 13:14:24 +0000 (13:14 -0000)
svn path=/trunk/mono/; revision=14576

mono/benchmark/Makefile.am
mono/benchmark/inline6.cs [new file with mode: 0755]
mono/benchmark/test-driver

index 84d107a70a7d384686888c566e5689ee3988c686..40dfaa5d3c8f56b41ed570d357f0f86a7e2477a3 100644 (file)
@@ -1,4 +1,5 @@
-TEST_PROG=../jit/mono
+TEST_PROG=../mini/mono
+RUNTIME_ARGS="-O=all"
 
 CSC=mcs
 
@@ -13,6 +14,7 @@ TESTSRC=                      \
        inline3.cs              \
        inline4.cs              \
        inline5.cs              \
+       inline6.cs              \
        muldiv.cs               \
        loops.cs                \
        initlocals.cs           \
@@ -36,7 +38,7 @@ test: $(TEST_PROG) $(TESTSI)
        @failed=0; \
        passed=0; \
        for i in $(TESTSI); do  \
-               if ./test-driver $(TEST_PROG) $$i; \
+               if ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
                then \
                        passed=`expr $${passed} + 1`; \
                else \
diff --git a/mono/benchmark/inline6.cs b/mono/benchmark/inline6.cs
new file mode 100755 (executable)
index 0000000..7874a53
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+
+public class Test {
+
+       public static int test (int n) {
+               int x = n + 1;
+
+               return x;
+       }
+
+       public static int Main (string[] args) {
+               int repeat = 1;
+
+               /*
+               if (args.Length == 1)
+                       repeat = Convert.ToInt32 (args [0]);
+               
+               Console.WriteLine ("Repeat = " + repeat);
+               */
+               
+               for (int i = 0; i < repeat; i++)
+                       for (int j = 0; j < 500000000; j++)
+                               test (12345);
+               
+               return 0;
+       }
+}
+
+
index b62810db1d9e603bca5432e754fe679fdd068df2..4f5ed6777e2e9c96fcd08744faaddc6f7fe05034 100755 (executable)
@@ -13,7 +13,7 @@ print "Testing $test... ";
 
 for ($c = 20 - length ($test); $c > 0; $c--) { print " "; }
 
-my $res = system("/usr/bin/time -o .res -f '%U' $interpreter $test 2>/dev/null 1>$stdout");
+my $res = system("/usr/bin/time -o .res -f '%U' $interpreter @ARGV $test 2>/dev/null 1>$stdout");
 
 if ($res) {
        printf ("failed $? (%d) signal (%d).\n", $? >> 8, $? & 127);