diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2019-04-16 15:19:01 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@well-typed.com> | 2019-06-16 11:32:08 -0400 |
| commit | 048d4d227dcf1af7019ae658dd71980b9f1406c1 (patch) | |
| tree | 51974cac76e54862140a1c9e19b4cfe600ab2762 | |
| parent | abf568ddb607149dff0c141661f07739e1335f6e (diff) | |
| download | haskell-048d4d227dcf1af7019ae658dd71980b9f1406c1.tar.gz | |
Emit GHC timing events to eventlog
(cherry picked from commit ebfa35284741fca47719f531f0996261441f75b0)
| -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 32e382909c..4488d9cf88 100644 --- a/compiler/main/ErrUtils.hs +++ b/compiler/main/ErrUtils.hs @@ -643,10 +643,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 |
