We used to log the major heap size before the sweep job finished. Remove the major heap logging at collection end time and add a separate log entry at sweep finish time.
if (!info->is_overflow)
sprintf (full_timing_buff, "total %.2fms, bridge %.2fms", info->stw_time / 10000.0f, (int)info->bridge_time / 10000.0f);
if (info->generation == GENERATION_OLD)
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "GC_MAJOR%s: (%s) pause %.2fms, %s major %dK/%dK los %dK/%dK",
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "GC_MAJOR%s: (%s) pause %.2fms, %s los %dK/%dK",
info->is_overflow ? "_OVERFLOW" : "",
info->reason ? info->reason : "",
(int)info->total_time / 10000.0f,
full_timing_buff,
- major_collector->section_size * num_major_sections / 1024,
- major_collector->section_size * last_major_num_sections / 1024,
los_memory_usage / 1024,
last_los_memory_usage / 1024);
else
}
}
+ sgen_memgov_major_post_sweep ();
+
set_sweep_state (SWEEP_STATE_SWEPT, SWEEP_STATE_COMPACTING);
}
}
}
+void
+sgen_memgov_major_post_sweep (void)
+{
+ mword num_major_sections = major_collector.get_num_major_sections ();
+
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "GC_MAJOR_SWEEP: major %dK/%dK",
+ num_major_sections * major_collector.section_size / 1024,
+ last_major_num_sections * major_collector.section_size / 1024);
+ last_major_num_sections = num_major_sections;
+}
+
void
sgen_memgov_major_collection_start (void)
{
if (info[i].generation != -1)
sgen_client_log_timing (&info [i], last_major_num_sections, last_los_memory_usage);
}
- last_major_num_sections = major_collector.get_num_major_sections ();
last_los_memory_usage = los_memory_usage;
}
void sgen_memgov_minor_collection_end (void);
void sgen_memgov_major_pre_sweep (void);
+void sgen_memgov_major_post_sweep (void);
void sgen_memgov_major_collection_start (void);
void sgen_memgov_major_collection_end (gboolean forced);