static ullong GC_tot_alloc = 0;
static ullong GC_tot_copied = 0;
+static ullong GC_tot_scavd_copied = 0;
static TICK_TYPE GC_start_time = 0, GC_tot_time = 0; /* User GC Time */
static TICK_TYPE GCe_start_time = 0, GCe_tot_time = 0; /* Elapsed GC time */
-------------------------------------------------------------------------- */
void
-stat_endGC(lnat alloc, lnat collect, lnat live, lnat copied, lnat gen)
+stat_endGC(lnat alloc, lnat collect, lnat live, lnat copied, lnat scavd_copied, lnat gen)
{
TICK_TYPE user, elapsed;
GC_coll_times[gen] += gc_time;
GC_tot_copied += (ullong) copied;
+ GC_tot_scavd_copied += (ullong) scavd_copied;
GC_tot_alloc += (ullong) alloc;
GC_tot_time += gc_time;
GCe_tot_time += gc_etime;
ullong_format_string(GC_tot_copied*sizeof(W_),
temp, rtsTrue/*commas*/);
- statsPrintf("%11s bytes copied during GC\n", temp);
+ statsPrintf("%11s bytes copied during GC (scavenged)\n", temp);
+ ullong_format_string(GC_tot_scavd_copied*sizeof(W_),
+ temp, rtsTrue/*commas*/);
+ statsPrintf("%11s bytes copied during GC (not scavenged)\n", temp);
+
if ( ResidencySamples > 0 ) {
ullong_format_string(MaxResidency*sizeof(W_),
temp, rtsTrue/*commas*/);
for (bd = step->large_objects, lge = 0; bd; bd = bd->link)
lge++;
live = 0;
- if (RtsFlags.GcFlags.generations == 1) {
- bd = step->to_blocks;
- } else {
- bd = step->blocks;
- }
+ bd = step->blocks;
for (; bd; bd = bd->link) {
live += (bd->free - bd->start) * sizeof(W_);
}