Commit f3795c06 authored by Simon Marlow's avatar Simon Marlow

Finish #3439: -ticky implies -debug at link time; the ticky "way" has gone

To get ticky profiling you still have to compile with -ticky (for
those modules that you want to profile), but you can link with either
-debug or -ticky.
parent 5205edda
......@@ -546,7 +546,9 @@ isNoLink _ = False
-- Is it worth evaluating this Bool and caching it in the DynFlags value
-- during initDynFlags?
doingTickyProfiling :: DynFlags -> Bool
doingTickyProfiling dflags = WayTicky `elem` wayNames dflags
doingTickyProfiling _ = opt_Ticky
-- XXX -ticky is a static flag, because it implies -debug which is also
-- static. If the way flags were made dynamic, we could fix this.
data PackageFlag
= ExposePackage String
......
......@@ -808,9 +808,9 @@ packageHsLibs dflags p = map (mkDynName . addSuffix) (hsLibraries p)
-- the name of a shared library is libHSfoo-ghc<version>.so
-- we leave out the _dyn, because it is superfluous
-- debug RTS includes support for -ticky and -eventlog
-- debug RTS includes support for -eventlog
ways2 | WayDebug `elem` map wayName ways1
= filter ((`notElem` [WayTicky,WayEventLog]) . wayName) ways1
= filter ((/= WayEventLog) . wayName) ways1
| otherwise
= ways1
......
......@@ -107,7 +107,6 @@ static_flags = [
------- ways --------------------------------------------------------
, Flag "prof" (NoArg (addWay WayProf)) Supported
, Flag "eventlog" (NoArg (addWay WayEventLog)) Supported
, Flag "ticky" (NoArg (addWay WayTicky)) Supported
, Flag "parallel" (NoArg (addWay WayPar)) Supported
, Flag "gransim" (NoArg (addWay WayGran)) Supported
, Flag "smp" (NoArg (addWay WayThreaded))
......@@ -115,7 +114,10 @@ static_flags = [
, Flag "debug" (NoArg (addWay WayDebug)) Supported
, Flag "ndp" (NoArg (addWay WayNDP)) Supported
, Flag "threaded" (NoArg (addWay WayThreaded)) Supported
-- ToDo: user ways
, Flag "ticky" (PassFlag (\f -> do addOpt f; addWay WayDebug)) Supported
-- -ticky enables ticky-ticky code generation, and also implies -debug which
-- is required to get the RTS ticky support.
------ Debugging ----------------------------------------------------
, Flag "dppr-debug" (PassFlag addOpt) Supported
......
......@@ -73,6 +73,7 @@ module StaticFlags (
v_Ld_inputs,
tablesNextToCode,
opt_StubDeadValues,
opt_Ticky,
-- For the parser
addOpt, removeOpt, addWay, getWayFlags, v_opt_C_ready
......@@ -290,6 +291,8 @@ tablesNextToCode = not opt_Unregisterised
opt_ErrorSpans :: Bool
opt_ErrorSpans = lookUp (fsLit "-ferror-spans")
opt_Ticky :: Bool
opt_Ticky = lookUp (fsLit "-ticky")
-- object files and libraries to be linked in are collected here.
-- ToDo: perhaps this could be done without a global, it wasn't obvious
......@@ -306,7 +309,7 @@ GLOBAL_VAR(v_Ld_inputs, [], [String])
-- non-profiling objects.
-- After parsing the command-line options, we determine which "way" we
-- are building - this might be a combination way, eg. profiling+threaded.
-- We then find the "build-tag" associated with this way, and this
-- becomes the suffix used to find .hi files and libraries used in
......@@ -317,7 +320,6 @@ data WayName
| WayDebug
| WayProf
| WayEventLog
| WayTicky
| WayPar
| WayGran
| WayNDP
......@@ -338,11 +340,6 @@ allowed_combination way = and [ x `allowedWith` y
_ `allowedWith` WayDyn = True
WayDyn `allowedWith` _ = True
-- ticky is (now) allowed with everything
-- Indeed, ticky should no longer be a 'way' at all
_ `allowedWith` WayTicky = True
WayTicky `allowedWith` _ = True
-- debug is allowed with everything
_ `allowedWith` WayDebug = True
WayDebug `allowedWith` _ = True
......@@ -419,10 +416,6 @@ way_details =
[ "-DTRACING"
, "-optc-DTRACING" ],
Way WayTicky "t" True "Ticky-ticky Profiling"
[ "-DTICKY_TICKY"
, "-optc-DTICKY_TICKY" ],
Way WayPar "mp" False "Parallel"
[ "-fparallel"
, "-D__PARALLEL_HASKELL__"
......
......@@ -235,8 +235,6 @@ BuildSharedLibs=$(strip $(if $(findstring dyn,$(GhcLibWays)),YES,NO))
# debug_p : debugging profiled
# thr_debug : debugging threaded
# thr_debug_p : debugging threaded profiled
# t : ticky-ticky profiling
# debug_t : debugging ticky-ticky profiling
# l : event logging
# thr_l : threaded and event logging
#
......
......@@ -40,10 +40,6 @@ WAY_v_HC_OPTS=
WAY_p_NAME=profiling
WAY_p_HC_OPTS= -prof
# Way 't':
WAY_t_NAME=ticky-ticky profiling
WAY_t_HC_OPTS= -ticky
# Way 'l':
WAY_l_NAME=event logging
WAY_l_HC_OPTS= -eventlog
......@@ -80,10 +76,6 @@ WAY_debug_HC_OPTS=-optc-DDEBUG
WAY_debug_p_NAME=debug profiled
WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
# Way 'debug_t':
WAY_debug_t_NAME=debug ticky-ticky profiling
WAY_debug_t_HC_OPTS= -ticky -optc-DDEBUG
# Way 'thr_debug':
WAY_thr_debug_NAME=threaded
WAY_thr_debug_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG
......
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