Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/45e0a0ab14b865f437c01e69394d6c45a8f7e66e >--------------------------------------------------------------- commit 45e0a0ab14b865f437c01e69394d6c45a8f7e66e Author: Simon Marlow <[email protected]> Date: Fri Jun 15 11:03:57 2012 +0100 add a test for INLINE and -fprof-auto (#6131) I had the test lying around already, just hooking it up >--------------------------------------------------------------- tests/profiling/should_run/all.T | 1 + tests/profiling/should_run/profinline001.hs | 14 ++++++++++ .../profiling/should_run/profinline001.prof.sample | 28 ++++++++++++++++++++ tests/profiling/should_run/profinline001.stdout | 1 + 4 files changed, 44 insertions(+), 0 deletions(-) diff --git a/tests/profiling/should_run/all.T b/tests/profiling/should_run/all.T index 0298c42..56b73b9 100644 --- a/tests/profiling/should_run/all.T +++ b/tests/profiling/should_run/all.T @@ -113,3 +113,4 @@ test('T5363', [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ], compile_and_run, ['']) +test('profinline001', extra_ways(['prof']), compile_and_run, ['']) diff --git a/tests/profiling/should_run/profinline001.hs b/tests/profiling/should_run/profinline001.hs new file mode 100644 index 0000000..86e08f4 --- /dev/null +++ b/tests/profiling/should_run/profinline001.hs @@ -0,0 +1,14 @@ +module Main (main, f, g, h, i) where + +main = print (f 42) + +f, g, h, i :: Int -> Int +f x = g x + h x + i x + +g x = x + 1 + +{-# INLINE h #-} +h x = x + 2 + +{-# INLINABLE i #-} +i x = x + 3 diff --git a/tests/profiling/should_run/profinline001.prof.sample b/tests/profiling/should_run/profinline001.prof.sample new file mode 100644 index 0000000..ac7bb77 --- /dev/null +++ b/tests/profiling/should_run/profinline001.prof.sample @@ -0,0 +1,28 @@ + Fri Jun 15 11:01 2012 Time and Allocation Profiling Report (Final) + + profinline001 +RTS -p -RTS + + total time = 0.00 secs (0 ticks @ 1000 us, 1 processor) + total alloc = 49,336 bytes (excludes profiling overheads) + +COST CENTRE MODULE %time %alloc + +MAIN MAIN 0.0 1.2 +CAF GHC.IO.Handle.FD 0.0 71.0 +CAF GHC.IO.Encoding 0.0 5.7 +CAF GHC.Conc.Signal 0.0 1.4 +main Main 0.0 19.2 + + + individual inherited +COST CENTRE MODULE no. entries %time %alloc %time %alloc + +MAIN MAIN 103 0 0.0 1.2 0.0 100.0 + CAF Main 205 0 0.0 0.8 0.0 20.3 + main Main 206 1 0.0 19.2 0.0 19.5 + f Main 207 1 0.0 0.3 0.0 0.4 + g Main 208 1 0.0 0.0 0.0 0.0 + CAF GHC.Conc.Signal 203 0 0.0 1.4 0.0 1.4 + CAF GHC.IO.Encoding 195 0 0.0 5.7 0.0 5.7 + CAF GHC.IO.Encoding.Iconv 193 0 0.0 0.5 0.0 0.5 + CAF GHC.IO.Handle.FD 185 0 0.0 71.0 0.0 71.0 diff --git a/tests/profiling/should_run/profinline001.stdout b/tests/profiling/should_run/profinline001.stdout new file mode 100644 index 0000000..94361d4 --- /dev/null +++ b/tests/profiling/should_run/profinline001.stdout @@ -0,0 +1 @@ +132 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
