summaryrefslogtreecommitdiff
path: root/rts/Stats.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-11-25 16:45:43 +0000
committerSimon Marlow <marlowsd@gmail.com>2016-12-06 15:25:50 +0000
commit24e6594cc7890babe69b8ba122d171affabad2d1 (patch)
tree0efef02a3e03787e9e6ee9822cb20efc7d48fec5 /rts/Stats.h
parenteec02ab7c8433465cc8d6be0a8889e7c6a222fb0 (diff)
downloadhaskell-24e6594cc7890babe69b8ba122d171affabad2d1.tar.gz
Overhaul GC stats
Summary: Visible API changes: * The C struct `GCDetails` gives the stats about a single GC. This is passed to the `gcDone()` callback if one is set via the RtsConfig. (previously we just passed a collection of values, so this is more extensible, at the expense of breaking the existing API) * `RTSStats` gives cumulative stats since the start of the program, and includes the `GCDetails` for the most recent GC. This struct can be obtained via `getRTSStats()` (the old `getGCStats()` has been removed, and `getGCStatsEnabled()` has been renamed to `getRTSStatsEnabled()`) Improvements: * The per-GC stats and cumulative stats are now cleanly separated. * Inside the RTS we have a top-level `RTSStats` struct to keep all our stats in, previously this was just a collection of strangely-named variables. This struct is mostly just copied in `getRTSStats()`, so the implementation of that function is a lot shorter. * Types are more consistent. We use a uint64_t byte count for all memory values, and Time for all time values. * Names are more consistent. We use a suffix `_bytes` for all byte counts and `_ns` for all time values. * We now collect information about the amount of memory in large objects and compact objects in `GCDetails`. (the latter was the reason I started doing this patch but it seems to have ballooned a bit!) * I fixed a bug in the calculation of the elapsed MUT time, and added an ASSERT to stop the calculations going wrong in the future. For now I kept the Haskell API in `GHC.Stats` the same, by impedence-matching with the new API. We could either break that API and make it match the C API more closely, or we could add a new API and deprecate the old one. Opinions welcome. This stuff is very easy to get wrong, and it's hard to test. Reviews welcome! Test Plan: manual testing validate Reviewers: bgamari, niteria, austin, ezyang, hvr, erikd, rwbarton, Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2756
Diffstat (limited to 'rts/Stats.h')
-rw-r--r--rts/Stats.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Stats.h b/rts/Stats.h
index 1d95170f2c..537f5695a5 100644
--- a/rts/Stats.h
+++ b/rts/Stats.h
@@ -31,7 +31,7 @@ void stat_startGCSync(struct gc_thread_ *_gct);
void stat_startGC(Capability *cap, struct gc_thread_ *_gct);
void stat_endGC (Capability *cap, struct gc_thread_ *_gct, W_ live,
W_ copied, W_ slop, uint32_t gen, uint32_t n_gc_threads,
- W_ par_max_copied, W_ par_tot_copied);
+ W_ par_max_copied);
#ifdef PROFILING
void stat_startRP(void);