[commit: ghc] wip/eventlog-heap-profile: Fix ways (c117e27)
git at git.haskell.org
git at git.haskell.org
Sat Mar 26 00:58:20 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/eventlog-heap-profile
Link : http://ghc.haskell.org/trac/ghc/changeset/c117e27f2e91990c8a96b92c130d341b8f3938d7/ghc
>---------------------------------------------------------------
commit c117e27f2e91990c8a96b92c130d341b8f3938d7
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sat Mar 26 01:32:46 2016 +0100
Fix ways
>---------------------------------------------------------------
c117e27f2e91990c8a96b92c130d341b8f3938d7
compiler/main/DynFlags.hs | 2 +-
mk/config.mk.in | 24 +++++++++++++-----------
mk/ways.mk | 44 +++++++++++++++++++++++---------------------
3 files changed, 37 insertions(+), 33 deletions(-)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index e4451f4..1ab2c93 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 d811359..a3763a0 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 80301f7..f144e0e 100644
--- a/mk/ways.mk
+++ b/mk/ways.mk
@@ -18,11 +18,19 @@
# - 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,
@@ -36,10 +44,6 @@ ALL_WAYS=v p l debug dyn thr thr_l p_dyn p_l debug_dyn thr_dyn thr_p_dyn thr_deb
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
More information about the ghc-commits
mailing list