Fix Work Balance computation in RTS stats
authorDouglas Wilson <douglas.wilson@gmail.com>
Tue, 11 Jul 2017 15:54:09 +0000 (11:54 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 11 Jul 2017 17:41:54 +0000 (13:41 -0400)
commit7c9e356de1114ab3e31f2d6d03e83672076dd533
tree5a89a142a31a53486e41c75673024548ce4c39ce
parent905dc8bc74bebf5370eb9237cc8756cd9fe871ae
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
includes/RtsAPI.h
includes/rts/EventLogFormat.h
libraries/base/GHC/Stats.hsc
rts/RtsProbes.d
rts/Stats.c
rts/Stats.h
rts/Trace.c
rts/Trace.h
rts/eventlog/EventLog.c
rts/eventlog/EventLog.h
rts/sm/GC.c