diff options
author | Ben Gamari <ben@smart-cactus.org> | 2016-03-26 01:32:46 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-03-26 01:32:46 +0100 |
commit | c117e27f2e91990c8a96b92c130d341b8f3938d7 (patch) | |
tree | b544dc9cdcde23e3293d78250f1d63083318a316 | |
parent | 237f7abac1730347e03e4dccf1c05909a79d50cb (diff) | |
download | haskell-wip/eventlog-heap-profile.tar.gz |
Fix wayswip/eventlog-heap-profile
-rw-r--r-- | compiler/main/DynFlags.hs | 2 | ||||
-rw-r--r-- | mk/config.mk.in | 24 | ||||
-rw-r--r-- | mk/ways.mk | 52 |
3 files changed, 41 insertions, 37 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index e4451f41b5..1ab2c937c7 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -2345,7 +2345,7 @@ dynamic_flags_deps = [ d { enableTimeStats = True }))) ------- ways --------------------------------------------------------------- - , make_ord_flag defGhcFlag "prof" (NoArg (addWay WayProf)) + , make_ord_flag defGhcFlag "prof" (NoArg (addWay WayProf >> addWay WayEventLog)) , make_ord_flag defGhcFlag "eventlog" (NoArg (addWay WayEventLog)) , make_dep_flag defGhcFlag "smp" (NoArg $ addWay WayThreaded) "Use -threaded instead" diff --git a/mk/config.mk.in b/mk/config.mk.in index d8113598f9..a3763a04b4 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -258,7 +258,7 @@ GhcLibWays = v # In addition to the normal sequential way, the default is to also build # profiled prelude libraries # $(if $(filter ...)) allows controlling this expression from build.mk. -GhcLibWays += $(if $(filter $(BUILD_PROF_LIBS),NO),,p) +GhcLibWays += $(if $(filter $(BUILD_PROF_LIBS),NO),,p_l) # Backward compatibility: although it would be cleaner to test for # PlatformSupportsSharedLibs, or perhaps a new variable BUILD_SHARED_LIBS, @@ -272,15 +272,17 @@ BuildSharedLibs=$(strip $(if $(findstring dyn,$(GhcLibWays)),YES,NO)) # In addition, the RTS is built in some further variations. Ways that # make sense here: # -# thr : threaded -# thr_p : threaded profiled -# debug : debugging (compile with -g for the C compiler, and -DDEBUG) -# debug_p : debugging profiled -# thr_debug : debugging threaded -# thr_debug_p : debugging threaded profiled -# l : event logging -# thr_l : threaded and event logging -# +# thr : threaded +# thr_p_l : threaded + profiled + event logging +# debug : debugging (compile with -g for the C compiler, and -DDEBUG) +# debug_p_l : debugging + profiled + event logging +# thr_debug : debugging + threaded, +# thr_debug_p_l : debugging + threaded + profiled + event logging +# l : event logging +# p_l : profiled + event logging +# thr_l : threaded + event logging +# +# Note how there is no plain "profiled" way, only p_l. GhcRTSWays=l # Usually want the debug version @@ -289,7 +291,7 @@ GhcRTSWays += debug # We always have the threaded versions, but note that SMP support may be disabled # (see GhcWithSMP). GhcRTSWays += thr thr_debug thr_l -GhcRTSWays += $(if $(findstring p, $(GhcLibWays)),thr_p p_l thr_p_l,) +GhcRTSWays += $(if $(findstring p_l, $(GhcLibWays)),p_l thr_p_l,) GhcRTSWays += $(if $(findstring dyn, $(GhcLibWays)),dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn,) # We can only build GHCi threaded if we have a threaded RTS: diff --git a/mk/ways.mk b/mk/ways.mk index 80301f751b..f144e0e796 100644 --- a/mk/ways.mk +++ b/mk/ways.mk @@ -1,6 +1,6 @@ # -# Options for compiling in different `ways'. -# +# Options for compiling in different `ways'. +# # To configure up your own way, have a look at some of the standard ways # such as profiling, and create your own set of WAY_*_OPTS defs below. # After having done that, add your way string to WAYS, and after having @@ -10,7 +10,7 @@ # # Definitions of the different ways: -# +# # * their name: # - tag, e.g., p # - description, e.g., profiling @@ -18,28 +18,32 @@ # - WAY_p_HC_OPTS gives the list of command-line options # to the driver. # +# For consistency, the way name should be formed from the tags in the following +# order (the same ordering defined in DynFlags.Way), +# +# - thr: threaded +# - debug: debugging +# - p: profiled +# - l: eventlog +# - dyn: dynamically-linked # # The ways currently defined. # -ALL_WAYS=v p l debug dyn thr thr_l p_dyn p_l debug_dyn thr_dyn thr_p_dyn thr_debug_dyn thr_p thr_debug debug_p thr_debug_p l_dyn thr_l_dyn p_l thr_p_l +ALL_WAYS=v l debug dyn thr thr_l p_l_dyn p_l debug_dyn thr_dyn thr_p_l_dyn thr_debug_dyn thr_debug debug_p_l thr_debug_p_l l_dyn thr_l_dyn thr_p_l # # The following ways currently are treated specially, # as the driver script treats these guys specially and needs to carefully be told # about the options for these. Hence, we hide the required command line options # for these in the driver, as this is the only place they are needed. -# +# # If you want to add to these default options, fill in the variables below: # Way 'v': WAY_v_NAME=vanilla WAY_v_HC_OPTS= -static -# Way 'p': -WAY_p_NAME=profiling -WAY_p_HC_OPTS= -static -prof - # Way 'l': WAY_l_NAME=event logging WAY_l_HC_OPTS= -static -eventlog @@ -52,10 +56,6 @@ WAY_l_HC_OPTS= -static -eventlog WAY_thr_NAME=threaded WAY_thr_HC_OPTS= -static -optc-DTHREADED_RTS -# Way 'thr_p': -WAY_thr_p_NAME=threaded profiled -WAY_thr_p_HC_OPTS= -static -optc-DTHREADED_RTS -prof - # Way 'thr_l': WAY_thr_l_NAME=threaded event logging WAY_thr_l_HC_OPTS= -static -optc-DTHREADED_RTS -eventlog @@ -64,9 +64,9 @@ WAY_thr_l_HC_OPTS= -static -optc-DTHREADED_RTS -eventlog WAY_debug_NAME=debug WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY -# Way 'debug_p': -WAY_debug_p_NAME=debug profiled -WAY_debug_p_HC_OPTS= -static -optc-DDEBUG -prof +# Way 'debug_p_l': +WAY_debug_p_l_NAME=debug profiled event logging +WAY_debug_p_l_HC_OPTS= -static -optc-DDEBUG -prof -eventlog # Way 'p_l': WAY_p_l_NAME=profiling event logging @@ -76,19 +76,21 @@ WAY_p_l_HC_OPTS= -static -prof -eventlog WAY_thr_debug_NAME=threaded debug WAY_thr_debug_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -# Way 'thr_debug_p': -WAY_thr_debug_p_NAME=threaded debug profiling -WAY_thr_debug_p_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -prof +# Way 'thr_debug_p_l': +WAY_thr_debug_p_NAME=threaded debug profiling event logging +WAY_thr_debug_p_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -prof -eventlog # Way 'dyn': build dynamic shared libraries WAY_dyn_NAME=dyn WAY_dyn_HC_OPTS=-fPIC -dynamic -WAY_p_dyn_NAME=p_dyn -WAY_p_dyn_HC_OPTS=-fPIC -dynamic -prof +# Way 'p_l_dyn': +WAY_p_dyn_NAME=p_l_dyn +WAY_p_dyn_HC_OPTS=-fPIC -dynamic -prof -eventlog -WAY_thr_p_dyn_NAME=thr_p_dyn -WAY_thr_p_dyn_HC_OPTS=-fPIC -dynamic -prof -optc-DTHREADED_RTS +# Way 'thr_p_l_dyn': +WAY_thr_p_dyn_NAME=thr_p_l_dyn +WAY_thr_p_dyn_HC_OPTS=-fPIC -dynamic -prof -eventlog -optc-DTHREADED_RTS # Way 'thr_dyn': WAY_thr_dyn_NAME=thr_dyn @@ -108,8 +110,8 @@ WAY_l_dyn_HC_OPTS= -fPIC -dynamic -eventlog # Way 'thr_l_dyn': WAY_thr_l_dyn_NAME=threaded event logging dynamic -WAY_thr_l_dyn_HC_OPTS= -fPIC -dynamic -optc-DTHREADED_RTS -eventlog +WAY_thr_l_dyn_HC_OPTS= -fPIC -dynamic -eventlog -optc-DTHREADED_RTS # Way 'thr_p_l': WAY_thr_p_l_NAME=threaded profiling event logging -WAY_thr_p_l_HC_OPTS= -static -prof -optc-DTHREADED_RTS -eventlog +WAY_thr_p_l_HC_OPTS= -static -prof -eventlog -optc-DTHREADED_RTS |