Skip to content

Commit 9bb3bb7

Browse files
[shake-bench] collect eventlogs (#1324)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 21cdce2 commit 9bb3bb7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ghcide/bench/hist/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ buildGhcide Cabal args out = do
147147
,"--install-method=copy"
148148
,"--overwrite-policy=always"
149149
,"--ghc-options=-rtsopts"
150+
,"--ghc-options=-eventlog"
150151
]
151152

152153
buildGhcide Stack args out =
@@ -156,6 +157,7 @@ buildGhcide Stack args out =
156157
,"ghcide:ghcide"
157158
,"--copy-bins"
158159
,"--ghc-options=-rtsopts"
160+
,"--ghc-options=-eventlog"
159161
]
160162

161163
benchGhcide

shake-bench/src/Development/Benchmark/Rules.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ benchRules build MkBenchRules{..} = do
290290
[ build -/- "*/*/*/*.csv",
291291
build -/- "*/*/*/*.gcStats.log",
292292
build -/- "*/*/*/*.output.log",
293+
build -/- "*/*/*/*.eventlog",
293294
build -/- "*/*/*/*.hp"
294-
] &%> \[outcsv, outGc, outLog, outHp] -> do
295+
] &%> \[outcsv, outGc, outLog, outEventlog, outHp] -> do
295296
let [_, flavour, exampleName, ver, exp] = splitDirectories outcsv
296297
prof = fromMaybe (error $ "Not a valid profiling mode: " <> flavour) $ profilingP flavour
297298
example <- fromMaybe (error $ "Unknown example " <> exampleName)
@@ -302,6 +303,7 @@ benchRules build MkBenchRules{..} = do
302303
let exePath = build </> "binaries" </> ver </> executableName
303304
exeExtraArgs =
304305
[ "+RTS"
306+
, "-l-au"
305307
, "-S" <> outGc]
306308
++ concat
307309
[[ "-h"
@@ -323,6 +325,7 @@ benchRules build MkBenchRules{..} = do
323325
AddPath [takeDirectory ghcPath, "."] []
324326
]
325327
BenchProject {..}
328+
liftIO $ renameFile "ghcide.eventlog" outEventlog
326329
liftIO $ case prof of
327330
CheapHeapProfiling{} -> renameFile "ghcide.hp" outHp
328331
NoProfiling -> writeFile outHp dummyHp

0 commit comments

Comments
 (0)