Commit c33e7c2b authored by Simon Marlow's avatar Simon Marlow Committed by Simon Marlow

Fix +RTS -h when compiling without -prof

Summary:
Was broken by ce1f1607.  I've added a
test so that hopefully it won't break again.

Test Plan: validate & new test case

Reviewers: bgamari, austin, erikd

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1746

GHC Trac Issues: #11304
parent 1abb7005
......@@ -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;
......
......@@ -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"
......@@ -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)],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment