summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/users_guide/9.6.1-notes.rst6
-rw-r--r--rts/sm/GC.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/users_guide/9.6.1-notes.rst b/docs/users_guide/9.6.1-notes.rst
index 04ea0e3bd2..d1eb93aef9 100644
--- a/docs/users_guide/9.6.1-notes.rst
+++ b/docs/users_guide/9.6.1-notes.rst
@@ -66,6 +66,12 @@ Compiler
- The :extension:`TypeInType` is now marked as deprecated. Its meaning has been included
in :extension:`PolyKinds` and :extension:`DataKinds`.
+Runtime System
+~~~~~~~~~~~~~~
+
+- Summary statistics, i.e. the output of :rts-flag:`-s [⟨file⟩]`, now correctly
+ accounts for bytes copied during sequential collections.
+
``base`` library
~~~~~~~~~~~~~~~~
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 22b29cf48d..e60fb314d8 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -170,6 +170,9 @@ is requested it takes 1, when a SYNC_GC_PAR is requested it takes n_capabilities
Clearly this is in need of some tidying up, but for now we tread carefully. We
call is_par_gc() to see whether we are in a parallel or sequential collection.
+If we are in a parallel collection we iterate over gc_threads, being careful to
+account for idle caps. If we are in a sequential collection we deal only with
+the thread local gct.
Of course this is valid only inside GarbageCollect ().
Omitting this check has led to issues such as #19147.
@@ -652,7 +655,11 @@ GarbageCollect (uint32_t collect_gen,
par_balanced_copied =
(par_balanced_copied_acc - copied + other_active_threads / 2) /
other_active_threads;
+ } else {
copied += gct->copied;
+ any_work += gct->any_work;
+ scav_find_work += gct->scav_find_work;
+ max_n_todo_overflow += gct->max_n_todo_overflow;
}
}