# HG changeset patch # User Gilles Duboscq # Date 1346149339 -7200 # Node ID 02d0c44df1630a0c78cb98430e668b35f2e0cfb1 # Parent 3e48cbd4b0aa30a88d59825306039e95cdc35199# Parent 471b9eb7419d0eef1bd47d6df985abcabfe0451b Merge diff -r 471b9eb7419d -r 02d0c44df163 graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.java --- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.java Mon Aug 27 18:02:22 2012 +0200 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.java Tue Aug 28 12:22:19 2012 +0200 @@ -98,10 +98,15 @@ return (0.0); } - // TODO (ds) disabled as JDK 7u6 + Graal breaks this for some as yet unknown reason) - //@Test + /* This test is sensible to the implementation of Math.pow, cos and sin. + * Since for these functions, the specs says "The computed result must be within 1 ulp of the exact result", + * different implementation may return different results. + * The 11 ulp delta allowed for test(100) tries to account for that but is not guaranteed to work forever. + */ + @Test public void run0() throws Throwable { - Assert.assertEquals(0.6248571921291398d, test(100), 0); + double expected = 0.6248571921291398d; + Assert.assertEquals(expected, test(100), 11 * Math.ulp(expected)); } } diff -r 471b9eb7419d -r 02d0c44df163 mx/sanitycheck.py --- a/mx/sanitycheck.py Mon Aug 27 18:02:22 2012 +0200 +++ b/mx/sanitycheck.py Tue Aug 28 12:22:19 2012 +0200 @@ -115,10 +115,10 @@ if specjvm2008 is None or not exists(join(specjvm2008, 'SPECjvm2008.jar')): mx.abort('Please set the SPECJVM2008 environment variable to a SPECjvm2008 directory') - score = re.compile(r"^(Score on|Noncompliant) (?P[a-zA-Z0-9\._]+)( result)?: (?P[0-9]+(,|\.)[0-9]+)( SPECjvm2008 Base)? ops/m$") + score = re.compile(r"^(Score on|Noncompliant) (?P[a-zA-Z0-9\._]+)( result)?: (?P[0-9]+((,|\.)[0-9]+)?)( SPECjvm2008 Base)? ops/m$") error = re.compile(r"^Errors in benchmark: ") # The ' ops/m' at the end of the success string is important : it's how you can tell valid and invalid runs apart - success = re.compile(r"^(Noncompliant c|C)omposite result: [0-9]+(,|\.)[0-9]+( SPECjvm2008 (Base|Peak))? ops/m$") + success = re.compile(r"^(Noncompliant c|C)omposite result: [0-9]+((,|\.)[0-9]+)?( SPECjvm2008 (Base|Peak))? ops/m$") matcher = Matcher(score, {'const:group' : "const:SPECjvm2008", 'const:name' : 'benchmark', 'const:score' : 'score'}, startNewLine=True) opts = []