diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/profiling/should_run/all.T | 6 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_run/dynamic-prof.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_run/dynamic-prof2.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_run/dynamic-prof3.hs | 15 |
4 files changed, 47 insertions, 0 deletions
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index fbe1379e92..9f1fa67e1e 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -8,6 +8,12 @@ test('heapprof002', test('T11489', [req_profiling], makefile_test, ['T11489']) +test('dynamic-prof', [], compile_and_run, ['']) + +test('dynamic-prof2', [only_ways(['normal']), extra_run_opts('+RTS -hT --no-automatic-heap-samples')], compile_and_run, ['']) + +test('dynamic-prof3', [only_ways(['normal']), extra_run_opts('+RTS -hT --no-automatic-heap-samples')], compile_and_run, ['']) + # Below this line, run tests only with profiling ways. setTestOpts(req_profiling) setTestOpts(extra_ways(['prof', 'ghci-ext-prof'])) diff --git a/testsuite/tests/profiling/should_run/dynamic-prof.hs b/testsuite/tests/profiling/should_run/dynamic-prof.hs new file mode 100644 index 0000000000..243e094877 --- /dev/null +++ b/testsuite/tests/profiling/should_run/dynamic-prof.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE BangPatterns #-} +module Main where + +import GHC.Profiling +import Control.Exception + +main = do + let !t = [0..1000000] + evaluate (length t) + requestHeapCensus + evaluate (length t) + + diff --git a/testsuite/tests/profiling/should_run/dynamic-prof2.hs b/testsuite/tests/profiling/should_run/dynamic-prof2.hs new file mode 100644 index 0000000000..243e094877 --- /dev/null +++ b/testsuite/tests/profiling/should_run/dynamic-prof2.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE BangPatterns #-} +module Main where + +import GHC.Profiling +import Control.Exception + +main = do + let !t = [0..1000000] + evaluate (length t) + requestHeapCensus + evaluate (length t) + + diff --git a/testsuite/tests/profiling/should_run/dynamic-prof3.hs b/testsuite/tests/profiling/should_run/dynamic-prof3.hs new file mode 100644 index 0000000000..f5a17bef8d --- /dev/null +++ b/testsuite/tests/profiling/should_run/dynamic-prof3.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE BangPatterns #-} +module Main where + +import GHC.Profiling +import Control.Exception + +main = do + startHeapProfTimer + let !t = [0..1000000] + evaluate (length t) + requestHeapCensus + evaluate (length t) + stopHeapProfTimer + + |