summaryrefslogtreecommitdiff
path: root/mk/ways.mk
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-06-16 15:03:01 +0200
committerBen Gamari <ben@smart-cactus.org>2016-07-16 20:31:47 +0200
commita9bc54766ddd1bdb011f1656ad58fb409055d08f (patch)
tree4d91f1a2c4c0b44b61c910a11b998bc71154f71a /mk/ways.mk
parentb35e01c6c39d9f2d58009722e24d89049aa94287 (diff)
downloadhaskell-a9bc54766ddd1bdb011f1656ad58fb409055d08f.tar.gz
Log heap profiler samples to event log
Test Plan: Try it Reviewers: hvr, simonmar, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1722 GHC Trac Issues: #11094
Diffstat (limited to 'mk/ways.mk')
-rw-r--r--mk/ways.mk49
1 files changed, 31 insertions, 18 deletions
diff --git a/mk/ways.mk b/mk/ways.mk
index 996530e12a..870b4a5460 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,18 +18,26 @@
# - 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 debug_dyn thr_dyn thr_p_dyn thr_debug_dyn thr_p thr_debug debug_p thr_debug_p l_dyn thr_l_dyn
+ALL_WAYS=v l debug dyn thr thr_l p_dyn p debug_dyn thr_dyn thr_p_dyn thr_debug_dyn thr_debug debug_p thr_debug_p l_dyn thr_l_dyn thr_p
#
# 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':
@@ -38,7 +46,7 @@ WAY_v_HC_OPTS= -static
# Way 'p':
WAY_p_NAME=profiling
-WAY_p_HC_OPTS= -static -prof
+WAY_p_HC_OPTS= -static -prof -eventlog
# Way 'l':
WAY_l_NAME=event logging
@@ -53,8 +61,8 @@ 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_p_NAME=threaded profiling
+WAY_thr_p_HC_OPTS= -static -prof -eventlog -optc-DTHREADED_RTS
# Way 'thr_l':
WAY_thr_l_NAME=threaded event logging
@@ -62,29 +70,35 @@ WAY_thr_l_HC_OPTS= -static -optc-DTHREADED_RTS -eventlog
# Way 'debug':
WAY_debug_NAME=debug
-WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY
+WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY -eventlog
# Way 'debug_p':
WAY_debug_p_NAME=debug profiled
-WAY_debug_p_HC_OPTS= -static -optc-DDEBUG -prof
+WAY_debug_p_HC_OPTS= -static -optc-DDEBUG -prof -eventlog
+
+# Way 'p':
+WAY_p_NAME=profiling
+WAY_p_HC_OPTS= -static -prof -eventlog
# Way 'thr_debug':
WAY_thr_debug_NAME=threaded debug
-WAY_thr_debug_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG
+WAY_thr_debug_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -eventlog
# 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_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':
WAY_p_dyn_NAME=p_dyn
-WAY_p_dyn_HC_OPTS=-fPIC -dynamic -prof
+WAY_p_dyn_HC_OPTS=-fPIC -dynamic -prof -eventlog
+# Way 'thr_p_dyn':
WAY_thr_p_dyn_NAME=thr_p_dyn
-WAY_thr_p_dyn_HC_OPTS=-fPIC -dynamic -prof -optc-DTHREADED_RTS
+WAY_thr_p_dyn_HC_OPTS=-fPIC -dynamic -prof -eventlog -optc-DTHREADED_RTS
# Way 'thr_dyn':
WAY_thr_dyn_NAME=thr_dyn
@@ -92,11 +106,11 @@ WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
# Way 'thr_debug_dyn':
WAY_thr_debug_dyn_NAME=thr_debug_dyn
-WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG
+WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG -eventlog
# Way 'debug_dyn':
WAY_debug_dyn_NAME=debug_dyn
-WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG -ticky -DTICKY_TICKY
+WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG -ticky -DTICKY_TICKY -eventlog
# Way 'l_dyn':
WAY_l_dyn_NAME=event logging dynamic
@@ -105,4 +119,3 @@ 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
-