(a -> Bool) -- Result within reasonable limits?
-- The various per-program aspects of execution that we can generate results for.
-size_spec, alloc_spec, runtime_spec, muttime_spec, gctime_spec,
+size_spec, alloc_spec, runtime_spec, muttime_spec, gctime_spec, gcelap_spec,
gcwork_spec, instrs_spec, mreads_spec, mwrite_spec, cmiss_spec
:: PerProgTableSpec
size_spec = SpecP "Binary Sizes" "Size" "binary-sizes" binary_size compile_status always_ok
runtime_spec = SpecP "Run Time" "Runtime" "run-times" (mean run_time) run_status time_ok
muttime_spec = SpecP "Mutator Time" "MutTime" "mutator-time" (mean mut_time) run_status time_ok
gctime_spec = SpecP "GC Time" "GCTime" "gc-time" (mean gc_time) run_status time_ok
+gcelap_spec = SpecP "GC Elapsed Time" "GCETime" "gc-elapsed-time" (mean gc_elapsed_time) run_status time_ok
gcwork_spec = SpecP "GC Work" "GCWork" "gc-work" gc_work run_status always_ok
instrs_spec = SpecP "Instructions" "Instrs" "instrs" instrs run_status always_ok
mreads_spec = SpecP "Memory Reads" "Reads" "mem-reads" mem_reads run_status always_ok
runtime_spec,
muttime_spec,
gctime_spec,
+ gcelap_spec,
gcwork_spec,
instrs_spec,
mreads_spec,
per_prog_result_tab :: [PerProgTableSpec]
per_prog_result_tab =
[ size_spec, alloc_spec, runtime_spec, muttime_spec, gctime_spec,
+ gcelap_spec,
gcwork_spec, instrs_spec, mreads_spec, mwrite_spec, cmiss_spec ]
-- A single summary table, giving comparison figures for a number of
cache_misses :: Maybe Integer,
gc_work :: Maybe Integer,
gc_time :: [Float],
+ gc_elapsed_time :: [Float],
allocs :: Maybe Integer,
run_status :: Status,
compile_status :: Status
mem_writes = Nothing,
cache_misses = Nothing,
gc_time = [],
+ gc_elapsed_time = [],
gc_work = Nothing,
allocs = Nothing,
compile_status = NotDone,
run_time = rt1, mut_time = mt1,
instrs = is1, mem_reads = mr1, mem_writes = mw1,
cache_misses = cm1,
- gc_time = gt1, gc_work = gw1,
+ gc_time = gt1, gc_elapsed_time = ge1, gc_work = gw1,
binary_size = bs1, allocs = al1,
run_status = rs1, compile_status = cs1 }
Results{ compile_time = ct2, link_time = lt2,
run_time = rt2, mut_time = mt2,
instrs = is2, mem_reads = mr2, mem_writes = mw2,
cache_misses = cm2,
- gc_time = gt2, gc_work = gw2,
+ gc_time = gt2, gc_elapsed_time = ge2, gc_work = gw2,
binary_size = bs2, allocs = al2,
run_status = rs2, compile_status = cs2 }
= Results{ compile_time = Map.unionWith (flip const) ct1 ct2,
mem_writes = mw1 `mplus` mw2,
cache_misses = cm1 `mplus` cm2,
gc_time = gt1 ++ gt2,
+ gc_elapsed_time= ge1 ++ ge2,
gc_work = gw1 `mplus` gw2,
binary_size = bs1 `mplus` bs2,
allocs = al1 `mplus` al2,
parse_run_time prog [] res ex = [(prog, res{run_status=ex})]
parse_run_time prog (l:ls) res ex =
case ghc1_re l of {
- Just (allocations, _, _, _, _, _, initialisation, _, mut, _, gc, _) ->
- got_run_result allocations initialisation mut gc Nothing
- Nothing Nothing Nothing Nothing;
+ Just (allocations, _, _, _, _, _, initialisation, _, mut, _, gc, gc_elapsed) ->
+ got_run_result allocations initialisation mut gc gc_elapsed
+ Nothing Nothing Nothing Nothing Nothing;
Nothing ->
case ghc2_re l of {
- Just (allocations, _, _, _, _, _, initialisation, _, mut, _, gc, _) ->
- got_run_result allocations initialisation mut gc Nothing
- Nothing Nothing Nothing Nothing;
+ Just (allocations, _, _, _, _, _, initialisation, _, mut, _, gc, gc_elapsed) ->
+ got_run_result allocations initialisation mut gc gc_elapsed
+ Nothing Nothing Nothing Nothing Nothing;
Nothing ->
case ghc3_re l of {
- Just (allocations, _, _, _, _, gc_work', _, initialisation, _, mut, _, gc, _) ->
- got_run_result allocations initialisation mut gc
+ Just (allocations, _, _, _, _, gc_work', _, initialisation, _, mut, _, gc, gc_elapsed) ->
+ got_run_result allocations initialisation mut gc gc_elapsed
(Just gc_work') Nothing Nothing Nothing Nothing;
Nothing ->
case ghc4_re l of {
- Just (allocations, _, _, _, _, gc_work', _, initialisation, _, mut, _, gc, _, is, mem_rs, mem_ws, cache_misses') ->
- got_run_result allocations initialisation mut gc
+ Just (allocations, _, _, _, _, gc_work', _, initialisation, _, mut, _, gc, gc_elapsed, is, mem_rs, mem_ws, cache_misses') ->
+ got_run_result allocations initialisation mut gc gc_elapsed
(Just gc_work') (Just is) (Just mem_rs)
(Just mem_ws) (Just cache_misses');
}}}}}}}}
where
- got_run_result allocations initialisation mut gc gc_work' instrs' mem_rs mem_ws cache_misses'
+ got_run_result allocations initialisation mut gc gc_elapsed gc_work' instrs' mem_rs mem_ws cache_misses'
= -- trace ("got_run_result: " ++ initialisation ++ ", " ++ mut ++ ", " ++ gc) $
let
time = initialisation + mut + gc
emptyResults{ run_time = [time],
mut_time = [mut],
gc_time = [gc],
+ gc_elapsed_time = [gc_elapsed],
gc_work = gc_work',
allocs = Just allocations,
instrs = instrs',