diff options
author | Douglas Wilson <douglas.wilson@gmail.com> | 2017-07-11 11:54:09 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-07-11 13:41:54 -0400 |
commit | 7c9e356de1114ab3e31f2d6d03e83672076dd533 (patch) | |
tree | 5a89a142a31a53486e41c75673024548ce4c39ce /rts/Trace.c | |
parent | 905dc8bc74bebf5370eb9237cc8756cd9fe871ae (diff) | |
download | haskell-7c9e356de1114ab3e31f2d6d03e83672076dd533.tar.gz |
Fix Work Balance computation in RTS stats
An additional stat is tracked per gc: par_balanced_copied This is the
the number of bytes copied by each gc thread under the balanced lmit,
which is simply (copied_bytes / num_gc_threads). The stat is added to
all the appropriate GC structures, so is visible in the eventlog and in
GHC.Stats.
A note is added explaining how work balance is computed.
Remove some end of line whitespace
Test Plan:
./validate
experiment with the program attached to the ticket
examine code changes carefully
Reviewers: simonmar, austin, hvr, bgamari, erikd
Reviewed By: simonmar
Subscribers: Phyx, rwbarton, thomie
GHC Trac Issues: #13830
Differential Revision: https://phabricator.haskell.org/D3658
Diffstat (limited to 'rts/Trace.c')
-rw-r--r-- | rts/Trace.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/Trace.c b/rts/Trace.c index 8978e2722b..71403f8a57 100644 --- a/rts/Trace.c +++ b/rts/Trace.c @@ -347,7 +347,8 @@ void traceEventGcStats_ (Capability *cap, W_ fragmentation, uint32_t par_n_threads, W_ par_max_copied, - W_ par_tot_copied) + W_ par_tot_copied, + W_ par_balanced_copied) { #if defined(DEBUG) if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) { @@ -357,7 +358,8 @@ void traceEventGcStats_ (Capability *cap, { postEventGcStats(cap, heap_capset, gen, copied, slop, fragmentation, - par_n_threads, par_max_copied, par_tot_copied); + par_n_threads, par_max_copied, + par_tot_copied, par_balanced_copied); } } |