summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/ProfHeap.c6
-rw-r--r--testsuite/config/ghc7
-rw-r--r--testsuite/tests/profiling/should_run/all.T11
-rw-r--r--testsuite/tests/profiling/should_run/heapprof002.stdout7
4 files changed, 21 insertions, 10 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index 43bd7b4225..e7f6417014 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -311,15 +311,11 @@ nextEra( void )
FILE *hp_file;
static char *hp_filename;
-void initProfiling (void)
-{
-}
-
void freeProfiling (void)
{
}
-void initProfiling2 (void)
+void initProfiling (void)
{
char *prog;
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index dc00adbe79..77dfa98873 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -23,7 +23,7 @@ config.compile_ways = ['normal', 'hpc']
config.run_ways = ['normal', 'hpc']
# ways that are not enabled by default, but can always be invoked explicitly
-config.other_ways = ['prof',
+config.other_ways = ['prof', 'prof_h',
'prof_hc_hb','prof_hb',
'prof_hd','prof_hy','prof_hr',
'threaded1_ls', 'threaded2_hT',
@@ -99,6 +99,7 @@ config.way_flags = lambda name : {
'threaded2' : ['-O', '-threaded', '-eventlog'],
'threaded2_hT' : ['-O', '-threaded'],
'hpc' : ['-O', '-fhpc', '-hpcdir', '.hpc.' + name ],
+ 'prof_h' : [],
'prof_hc_hb' : ['-O', '-prof', '-static', '-auto-all'],
'prof_hb' : ['-O', '-prof', '-static', '-auto-all'],
'prof_hd' : ['-O', '-prof', '-static', '-auto-all'],
@@ -114,7 +115,7 @@ config.way_flags = lambda name : {
'ghci-ext' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fexternal-interpreter', '+RTS', '-I0.1', '-RTS'],
}
-config.way_rts_flags = {
+config.way_rts_flags = {
'normal' : [],
'g1' : ['-G1'],
'optasm' : [],
@@ -130,6 +131,7 @@ config.way_rts_flags = {
'threaded2' : ['-N2 -ls'],
'threaded2_hT' : ['-N2', '-hT'],
'hpc' : [],
+ 'prof_h' : ['-h'], # works without -prof
'prof_hc_hb' : ['-hc -hbvoid'],
'prof_hb' : ['-hb'],
'prof_hd' : ['-hd'],
@@ -216,4 +218,3 @@ def get_compiler_info():
config.ghci_way_flags = "-static"
config.ghc_th_way = "normal"
config.ghc_plugin_way = "normal"
-
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T
index 4e4bd09698..840b25104d 100644
--- a/testsuite/tests/profiling/should_run/all.T
+++ b/testsuite/tests/profiling/should_run/all.T
@@ -4,11 +4,18 @@ extra_prof_ways = ['prof', 'prof_hc_hb', 'prof_hb', 'prof_hd', 'prof_hy', 'prof_
test('heapprof001',
[only_ways(prof_ways),
- extra_ways(extra_prof_ways),
- req_profiling,
+ when(have_profiling(), extra_ways(extra_prof_ways)),
extra_run_opts('7')],
compile_and_run, [''])
+test('heapprof002',
+ [ pre_cmd('cp heapprof001.hs heapprof002.hs')
+ , extra_clean(['heapprof002.hs'])
+ , extra_ways(['prof_h'])
+ , extra_run_opts('7')
+ ],
+ compile_and_run, [''])
+
test('T2592',
[only_ways(['profasm']), req_profiling,
extra_run_opts('+RTS -M1m -RTS'), exit_code(251)],
diff --git a/testsuite/tests/profiling/should_run/heapprof002.stdout b/testsuite/tests/profiling/should_run/heapprof002.stdout
new file mode 100644
index 0000000000..e62352412e
--- /dev/null
+++ b/testsuite/tests/profiling/should_run/heapprof002.stdout
@@ -0,0 +1,7 @@
+a <=
+a <=
+a <=
+a <=
+a <=
+a <=
+a <=