From 1e58d75461d3a60ac6be6ff60b30d7e67cdd3dee Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Sat, 1 Jul 2017 00:01:52 +0300 Subject: [PATCH] [sgen] Include mod union times to stats --- mono/sgen/sgen-gc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mono/sgen/sgen-gc.c b/mono/sgen/sgen-gc.c index 83e0d8307a8..a58d236da1f 100644 --- a/mono/sgen/sgen-gc.c +++ b/mono/sgen/sgen-gc.c @@ -282,7 +282,8 @@ static guint64 time_major_pre_collection_fragment_clear = 0; static guint64 time_major_pinning = 0; static guint64 time_major_scan_pinned = 0; static guint64 time_major_scan_roots = 0; -static guint64 time_major_scan_mod_union = 0; +static guint64 time_major_scan_mod_union_blocks = 0; +static guint64 time_major_scan_mod_union_los = 0; static guint64 time_major_finish_gray_stack = 0; static guint64 time_major_free_bigobjs = 0; static guint64 time_major_los_sweep = 0; @@ -1279,7 +1280,8 @@ init_stats (void) mono_counters_register ("Major pinning", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_pinning); mono_counters_register ("Major scan pinned", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_scan_pinned); mono_counters_register ("Major scan roots", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_scan_roots); - mono_counters_register ("Major scan mod union", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_scan_mod_union); + mono_counters_register ("Major scan mod union blocks", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_scan_mod_union_blocks); + mono_counters_register ("Major scan mod union los", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_scan_mod_union_los); mono_counters_register ("Major finish gray stack", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_finish_gray_stack); mono_counters_register ("Major free big objects", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_free_bigobjs); mono_counters_register ("Major LOS sweep", MONO_COUNTER_GC | MONO_COUNTER_ULONG | MONO_COUNTER_TIME, &time_major_los_sweep); @@ -1466,21 +1468,31 @@ job_scan_los_card_table (void *worker_data_untyped, SgenThreadPoolJob *job) static void job_scan_major_mod_union_card_table (void *worker_data_untyped, SgenThreadPoolJob *job) { + SGEN_TV_DECLARE (atv); + SGEN_TV_DECLARE (btv); ParallelScanJob *job_data = (ParallelScanJob*)job; ScanCopyContext ctx = scan_copy_context_for_scan_job (worker_data_untyped, (ScanJob*)job_data); g_assert (concurrent_collection_in_progress); + SGEN_TV_GETTIME (atv); major_collector.scan_card_table (CARDTABLE_SCAN_MOD_UNION, ctx, job_data->job_index, job_data->job_split_count); + SGEN_TV_GETTIME (btv); + time_major_scan_mod_union_blocks += SGEN_TV_ELAPSED (atv, btv); } static void job_scan_los_mod_union_card_table (void *worker_data_untyped, SgenThreadPoolJob *job) { + SGEN_TV_DECLARE (atv); + SGEN_TV_DECLARE (btv); ParallelScanJob *job_data = (ParallelScanJob*)job; ScanCopyContext ctx = scan_copy_context_for_scan_job (worker_data_untyped, (ScanJob*)job_data); g_assert (concurrent_collection_in_progress); + SGEN_TV_GETTIME (atv); sgen_los_scan_card_table (CARDTABLE_SCAN_MOD_UNION, ctx, job_data->job_index, job_data->job_split_count); + SGEN_TV_GETTIME (btv); + time_major_scan_mod_union_los += SGEN_TV_ELAPSED (atv, btv); } static void -- 2.25.1