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 /includes/RtsAPI.h | |
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 'includes/RtsAPI.h')
-rw-r--r-- | includes/RtsAPI.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/RtsAPI.h b/includes/RtsAPI.h index f1c04fa360..1ed5fb06f0 100644 --- a/includes/RtsAPI.h +++ b/includes/RtsAPI.h @@ -135,6 +135,8 @@ typedef struct GCDetails_ { uint64_t copied_bytes; // In parallel GC, the max amount of data copied by any one thread uint64_t par_max_copied_bytes; + // In parallel GC, the amount of balanced data copied by all threads + uint64_t par_balanced_copied_bytes; // The time elapsed during synchronisation before GC Time sync_elapsed_ns; // The CPU time used during GC itself @@ -176,6 +178,8 @@ typedef struct _RTSStats { uint64_t par_copied_bytes; // Sum of par_max_copied_bytes across all parallel GCs uint64_t cumulative_par_max_copied_bytes; + // Sum of par_balanced_copied_byes across all parallel GCs. + uint64_t cumulative_par_balanced_copied_bytes; // ----------------------------------- // Cumulative stats about time use |