From fdc2b4f93ac3604b0c340e9d4cda5a7e340deb52 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sat, 6 Feb 2021 07:56:15 +0000 Subject: [PATCH] [shake-bench] collect eventlogs --- ghcide/bench/hist/Main.hs | 2 ++ shake-bench/src/Development/Benchmark/Rules.hs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ghcide/bench/hist/Main.hs b/ghcide/bench/hist/Main.hs index c34e2529a1..8b12621e6c 100644 --- a/ghcide/bench/hist/Main.hs +++ b/ghcide/bench/hist/Main.hs @@ -141,6 +141,7 @@ buildGhcide Cabal args out = do ,"--install-method=copy" ,"--overwrite-policy=always" ,"--ghc-options=-rtsopts" + ,"--ghc-options=-eventlog" ] buildGhcide Stack args out = @@ -150,6 +151,7 @@ buildGhcide Stack args out = ,"ghcide:ghcide" ,"--copy-bins" ,"--ghc-options=-rtsopts" + ,"--ghc-options=-eventlog" ] benchGhcide diff --git a/shake-bench/src/Development/Benchmark/Rules.hs b/shake-bench/src/Development/Benchmark/Rules.hs index cca1e7fa24..9d280dbe8c 100644 --- a/shake-bench/src/Development/Benchmark/Rules.hs +++ b/shake-bench/src/Development/Benchmark/Rules.hs @@ -267,8 +267,9 @@ benchRules build MkBenchRules{..} = do [ build -/- "*/*/*/*.csv", build -/- "*/*/*/*.gcStats.log", build -/- "*/*/*/*.output.log", + build -/- "*/*/*/*.eventlog", build -/- "*/*/*/*.hp" - ] &%> \[outcsv, outGc, outLog, outHp] -> do + ] &%> \[outcsv, outGc, outLog, outEventlog, outHp] -> do let [_, flavour, exampleName, ver, exp] = splitDirectories outcsv prof = fromMaybe (error $ "Not a valid profiling mode: " <> flavour) $ profilingP flavour example <- fromMaybe (error $ "Unknown example " <> exampleName) @@ -279,6 +280,7 @@ benchRules build MkBenchRules{..} = do let exePath = build "binaries" ver executableName exeExtraArgs = [ "+RTS" + , "-l-au" , "-S" <> outGc] ++ concat [[ "-h" @@ -299,6 +301,7 @@ benchRules build MkBenchRules{..} = do AddPath [takeDirectory ghcPath, "."] [] ] BenchProject {..} + liftIO $ renameFile "ghcide.eventlog" outEventlog liftIO $ case prof of CheapHeapProfiling{} -> renameFile "ghcide.hp" outHp NoProfiling -> writeFile outHp dummyHp