diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-06-15 11:03:57 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-06-15 11:03:57 +0100 |
commit | 2a99c19a5a9ccf5de78880e54f462822a49c43b0 (patch) | |
tree | fa4b82f348537078625046ab36086e68fe6c8ee1 /testsuite/tests/profiling | |
parent | 0c0b2bb1846b11ed5dd74bb90d530db231848030 (diff) | |
download | haskell-2a99c19a5a9ccf5de78880e54f462822a49c43b0.tar.gz |
add a test for INLINE and -fprof-auto (#6131)
I had the test lying around already, just hooking it up
Diffstat (limited to 'testsuite/tests/profiling')
4 files changed, 44 insertions, 0 deletions
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 0298c42141..56b73b9198 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/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/testsuite/tests/profiling/should_run/profinline001.hs b/testsuite/tests/profiling/should_run/profinline001.hs new file mode 100644 index 0000000000..86e08f4733 --- /dev/null +++ b/testsuite/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/testsuite/tests/profiling/should_run/profinline001.prof.sample b/testsuite/tests/profiling/should_run/profinline001.prof.sample new file mode 100644 index 0000000000..ac7bb77c63 --- /dev/null +++ b/testsuite/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/testsuite/tests/profiling/should_run/profinline001.stdout b/testsuite/tests/profiling/should_run/profinline001.stdout new file mode 100644 index 0000000000..94361d49fd --- /dev/null +++ b/testsuite/tests/profiling/should_run/profinline001.stdout @@ -0,0 +1 @@ +132 |