[Git][ghc/ghc][wip/gc/progress-to-eventlog] Emit GHC timing events to eventlog
Ben Gamari
gitlab at gitlab.haskell.org
Tue Apr 16 20:27:22 UTC 2019
Ben Gamari pushed to branch wip/gc/progress-to-eventlog at Glasgow Haskell Compiler / GHC
Commits:
5e6cedd2 by Ben Gamari at 2019-04-16T20:27:09Z
Emit GHC timing events to eventlog
- - - - -
1 changed file:
- compiler/main/ErrUtils.hs
Changes:
=====================================
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
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/5e6cedd200f4131824e4220f9e11d7d43a382d92
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/5e6cedd200f4131824e4220f9e11d7d43a382d92
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190416/97945274/attachment.html>
More information about the ghc-commits
mailing list