diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-11-09 09:50:13 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-11-09 10:38:54 +0000 |
commit | d704d6c8b80e61f6bdb4810177cd205732e40f71 (patch) | |
tree | 27fb0f0119a581643b2b556ae320cf3c97f16169 /testsuite/tests/profiling | |
parent | 305f85c0401c1dca09f7fbafaeffd2ebd2956c54 (diff) | |
download | haskell-d704d6c8b80e61f6bdb4810177cd205732e40f71.tar.gz |
add test for #5559 (unicode cost-centre names)
Diffstat (limited to 'testsuite/tests/profiling')
-rw-r--r-- | testsuite/tests/profiling/should_run/T5559.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_run/T5559.prof.sample | 23 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_run/T5559.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/profiling/should_run/all.T | 5 |
4 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/tests/profiling/should_run/T5559.hs b/testsuite/tests/profiling/should_run/T5559.hs new file mode 100644 index 0000000000..e25a40f82a --- /dev/null +++ b/testsuite/tests/profiling/should_run/T5559.hs @@ -0,0 +1,8 @@ +føb :: Integer -> Integer +føb n + | n == 0 = 0 + | n == 1 = 1 + | n >= 2 = føb (n - 1) + føb (n - 2) + +main :: IO () +main = print (føb 26) diff --git a/testsuite/tests/profiling/should_run/T5559.prof.sample b/testsuite/tests/profiling/should_run/T5559.prof.sample new file mode 100644 index 0000000000..6bc1740f24 --- /dev/null +++ b/testsuite/tests/profiling/should_run/T5559.prof.sample @@ -0,0 +1,23 @@ + Wed Nov 9 09:45 2011 Time and Allocation Profiling Report (Final) + + T5559 +RTS -p -RTS + + total time = 0.08 secs (4 ticks @ 20 ms) + total alloc = 52,274,888 bytes (excludes profiling overheads) + +COST CENTRE MODULE %time %alloc + +føb Main 100.0 99.9 + + + individual inherited +COST CENTRE MODULE no. entries %time %alloc %time %alloc + +MAIN MAIN 100 0 0.0 0.0 100.0 100.0 + CAF GHC.IO.Handle.FD 126 0 0.0 0.1 0.0 0.1 + CAF GHC.IO.Encoding.Iconv 118 0 0.0 0.0 0.0 0.0 + CAF GHC.IO.Encoding 116 0 0.0 0.0 0.0 0.0 + CAF GHC.Conc.Signal 108 0 0.0 0.0 0.0 0.0 + CAF Main 106 0 0.0 0.0 100.0 99.9 + main Main 200 1 0.0 0.0 100.0 99.9 + føb Main 201 392835 100.0 99.9 100.0 99.9 diff --git a/testsuite/tests/profiling/should_run/T5559.stdout b/testsuite/tests/profiling/should_run/T5559.stdout new file mode 100644 index 0000000000..cbe88fb78e --- /dev/null +++ b/testsuite/tests/profiling/should_run/T5559.stdout @@ -0,0 +1 @@ +121393 diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T index 0fa53f7764..86c39073f6 100644 --- a/testsuite/tests/profiling/should_run/all.T +++ b/testsuite/tests/profiling/should_run/all.T @@ -77,6 +77,11 @@ test('prof-doc-last', compile_and_run, ['']) +test('T5559', # unicode in cost centre names + [ req_profiling, extra_ways(['prof']), only_ways(['prof'] + prof_ways) ], + compile_and_run, + ['']) + # Note [consistent stacks] # Certain optimisations can change the stacks we get out of the # profiler. These flags are necessary (but perhaps not sufficient) |