Skip to content
Snippets Groups Projects
Commit 5458ca19 authored by Ben Gamari's avatar Ben Gamari :turtle:
Browse files

shake: Don't claim to generate Main.cachegrind.result

We rather generate `Main.cachegrind.result.<n>`. For now I'll just let
this fact go unrepresented in the build graph.
parent d96959b2
No related branches found
No related tags found
1 merge request!33Cachegrind fixes
Pipeline #26379 passed
......@@ -444,14 +444,18 @@ buildRules nofib@Build{..} = do
runTest nofib (ModeWrapped args parse_perf) resultsTsv
-- Run tests under cachegrind
["//Main.cachegrind.result", "//Main.cachegrind.results.tsv"] &%> \[out, resultsTsv] -> do
out' <- liftIO $ IO.canonicalizePath out
["//Main.cachegrind.results.tsv"] &%> \[resultsTsv] -> do
out' <- liftIO $ IO.canonicalizePath resultsTsv
let test = testFromResultTsv nofib resultsTsv
let wrapper_args n = ["valgrind", "--tool=cachegrind"] <> cachegrind_args <>
[ ("--cachegrind-out-file="<>out'<.>show n)
, "--log-file=cachegrind.log"]
let cachegrindOut n = FP.replaceFileName out' ("Main.cachegrind.result" <.> show n)
let wrapper_args n =
["valgrind", "--tool=cachegrind"] <> cachegrind_args <>
[ "--cachegrind-out-file="<>cachegrindOut n
, "--log-file=cachegrind.log"
]
let parse_cachegrind n = do
stats <- CachegrindParse.parse (out' <.> show n)
stats <- CachegrindParse.parse (cachegrindOut n)
return $ Ms.fromList
[ (testLabel test <> ml "run" <> ml "cachegrind" <> lbl, realToFrac v)
| (eventName, v) <- M.toList stats
......@@ -749,4 +753,4 @@ removeDirectoryRecursive x = do
when b $ IO.removeDirectoryRecursive x
printM :: (MonadIO m, Show a) => a -> m ()
printM x = liftIO $ print x
\ No newline at end of file
printM x = liftIO $ print x
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment