Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/1e1c8aa4550148b357dcdb756ad6f7d0971de79a

>---------------------------------------------------------------

commit 1e1c8aa4550148b357dcdb756ad6f7d0971de79a
Author: Ian Lynagh <[email protected]>
Date:   Sun Jun 26 17:05:31 2011 +0100

    Add a perf test for #5205

>---------------------------------------------------------------

 tests/ghc-regress/perf/should_run/T5205.hs         |   13 +++++++++++++
 .../num009.stdout => perf/should_run/T5205.stdout} |    0 
 tests/ghc-regress/perf/should_run/all.T            |   15 +++++++++++++++
 3 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/tests/ghc-regress/perf/should_run/T5205.hs 
b/tests/ghc-regress/perf/should_run/T5205.hs
new file mode 100644
index 0000000..215dd42
--- /dev/null
+++ b/tests/ghc-regress/perf/should_run/T5205.hs
@@ -0,0 +1,13 @@
+
+import Control.Concurrent
+import Control.Monad
+
+main :: IO ()
+main = do t <- forkIO (x >> x)
+          threadDelay 1000000
+          killThread t
+          putStrLn "Done"
+
+x :: IO ()
+x = forever yield
+
diff --git a/tests/ghc-regress/lib/Numeric/num009.stdout 
b/tests/ghc-regress/perf/should_run/T5205.stdout
similarity index 100%
copy from tests/ghc-regress/lib/Numeric/num009.stdout
copy to tests/ghc-regress/perf/should_run/T5205.stdout
diff --git a/tests/ghc-regress/perf/should_run/all.T 
b/tests/ghc-regress/perf/should_run/all.T
index 5d6c148..0413397 100644
--- a/tests/ghc-regress/perf/should_run/all.T
+++ b/tests/ghc-regress/perf/should_run/all.T
@@ -131,3 +131,18 @@ test('T4978',
       ],
      compile_and_run,
      ['-O2'])
+
+test('T5205',
+     [if_wordsize(32,
+          stats_num_field('bytes allocated', 40000,
+                                             50000)),
+                           # expected value: 47088 (x86/Darwin)
+      if_wordsize(64,
+          stats_num_field('bytes allocated', 40000,
+                                             60000)),
+                           # expected value: 51320 (amd64/Linux)
+      only_ways(['normal'])
+      ],
+     compile_and_run,
+     ['-O'])
+



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to