summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorAlp Mestanogullari <alpmestan@gmail.com>2019-09-07 10:51:47 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-19 21:42:17 -0400
commitb3e5c73119e5c3bf801885e56cababa446434211 (patch)
tree52a6c4df29305d1f25bb762371f650496e85f00c /compiler/iface
parent521739900fe993ff73ec0da2215bc7572a15826d (diff)
downloadhaskell-b3e5c73119e5c3bf801885e56cababa446434211.tar.gz
ErrUtils: split withTiming into withTiming and withTimingSilent
'withTiming' becomes a function that, when passed '-vN' (N >= 2) or '-ddump-timings', will print timing (and possibly allocations) related information. When additionally built with '-eventlog' and executed with '+RTS -l', 'withTiming' will also emit both 'traceMarker' and 'traceEvent' events to the eventlog. 'withTimingSilent' on the other hand will never print any timing information, under any circumstance, and will only emit 'traceEvent' events to the eventlog. As pointed out in !1672, 'traceMarker' is better suited for things that we might want to visualize in tools like eventlog2html, while 'traceEvent' is better suited for internal events that occur a lot more often and that we don't necessarily want to visualize. This addresses #17138 by using 'withTimingSilent' for all the codegen bits that are expressed as a bunch of small computations over streams of codegen ASTs.
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/LoadIface.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index 16963dcb94..f501e0354b 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -399,7 +399,7 @@ loadInterface doc_str mod from
-- Redo search for our local hole module
loadInterface doc_str (mkModule (thisPackage dflags) (moduleName mod)) from
| otherwise
- = withTiming getDynFlags (text "loading interface") (pure ()) $
+ = withTimingSilent getDynFlags (text "loading interface") (pure ()) $
do { -- Read the state
(eps,hpt) <- getEpsAndHpt
; gbl_env <- getGblEnv