diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-04-16 15:19:01 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-04-30 20:41:42 -0400 |
commit | ebfa35284741fca47719f531f0996261441f75b0 (patch) | |
tree | 2f8241e34992d52309313a6cb1dbdc41d80415b4 /compiler | |
parent | 1bef62c38d3737b5f5d7ebbb479f3c1a12b1aa09 (diff) | |
download | haskell-ebfa35284741fca47719f531f0996261441f75b0.tar.gz |
Emit GHC timing events to eventlog
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/main/ErrUtils.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs index ae147829aa..d036c1f7d9 100644 --- a/compiler/main/ErrUtils.hs +++ b/compiler/main/ErrUtils.hs @@ -653,10 +653,12 @@ withTiming getDFlags what force_result action if verbosity dflags >= 2 || dopt Opt_D_dump_timings dflags then do liftIO $ logInfo dflags (defaultUserStyle dflags) $ text "***" <+> what <> colon + liftIO $ traceEventIO $ showSDocOneLine dflags $ text "GHC:started:" <+> what alloc0 <- liftIO getAllocationCounter start <- liftIO getCPUTime !r <- action () <- pure $ force_result r + liftIO $ traceEventIO $ showSDocOneLine dflags $ text "GHC:finished:" <+> what end <- liftIO getCPUTime alloc1 <- liftIO getAllocationCounter -- recall that allocation counter counts down |