diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs index ae147829aa3515db0a467513f42d05a34d8d0215..d036c1f7d90d68ea612a07ee104c56b0065c3730 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