[sgen] Don't log previous collection memory size
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 9 May 2016 10:32:27 +0000 (13:32 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Wed, 18 May 2016 20:53:12 +0000 (23:53 +0300)
This information can be found in the previous log entries.

mono/metadata/sgen-mono.c
mono/sgen/sgen-client.h
mono/sgen/sgen-memory-governor.c

index 450f7c696273c87ff90ed49dd8f72f8aab6bb797..7db08418adf89d8444e4560d581a9a1bdd6581cf 100644 (file)
@@ -2718,7 +2718,7 @@ sgen_client_degraded_allocation (size_t size)
 }
 
 void
-sgen_client_log_timing (GGTimingInfo *info, mword promoted_size, mword last_los_memory_usage)
+sgen_client_log_timing (GGTimingInfo *info, mword promoted_size)
 {
        SgenMajorCollector *major_collector = sgen_get_major_collector ();
        mword num_major_sections = major_collector->get_num_major_sections ();
@@ -2728,13 +2728,12 @@ sgen_client_log_timing (GGTimingInfo *info, mword promoted_size, mword last_los_
        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 los %dK/%dK",
+               mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "GC_MAJOR%s: (%s) pause %.2fms, %s los %dK",
                        info->is_overflow ? "_OVERFLOW" : "",
                        info->reason ? info->reason : "",
                        (int)info->total_time / 10000.0f,
                        full_timing_buff,
-                       los_memory_usage / 1024,
-                       last_los_memory_usage / 1024);
+                       los_memory_usage / 1024);
        else
                mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "GC_MINOR%s: (%s) pause %.2fms, %s promoted %dK major %dK los %dK",
                                info->is_overflow ? "_OVERFLOW" : "",
index d8794354666a993f73cd2abf8b1f71d1648b16fc..9d8f151ec2fb1ccaf0743b7e2edd3a3a6f96f378 100644 (file)
@@ -201,7 +201,7 @@ void sgen_client_clear_togglerefs (char *start, char *end, ScanCopyContext ctx);
  * Called after collections, reporting the amount of time they took.  No action is
  * necessary.
  */
-void sgen_client_log_timing (GGTimingInfo *info, mword promoted_size, mword last_los_memory_usage);
+void sgen_client_log_timing (GGTimingInfo *info, mword promoted_size);
 
 /*
  * Called to handle `MONO_GC_PARAMS` and `MONO_GC_DEBUG` options.  The `handle` functions
index 9d56af89ff9b1b77827a5c628f76e89bf17ee66b..783ed609ec061ff2bb77b3186071db150ffcd5b0 100644 (file)
@@ -51,9 +51,6 @@ static mword major_collection_trigger_size;
 static mword major_pre_sweep_heap_size;
 static mword major_start_heap_size;
 
-static mword last_major_num_sections = 0;
-static mword last_los_memory_usage = 0;
-
 static gboolean need_calculate_minor_collection_allowance;
 
 /* The size of the LOS after the last major collection, after sweeping. */
@@ -187,10 +184,8 @@ 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;
+       mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "GC_MAJOR_SWEEP: major %dK",
+               num_major_sections * major_collector.section_size / 1024);
 }
 
 void
@@ -226,9 +221,8 @@ sgen_memgov_collection_end (int generation, GGTimingInfo* info, int info_count)
        int i;
        for (i = 0; i < info_count; ++i) {
                if (info[i].generation != -1)
-                       sgen_client_log_timing (&info [i], total_promoted_size - total_promoted_size_start, last_los_memory_usage);
+                       sgen_client_log_timing (&info [i], total_promoted_size - total_promoted_size_start);
        }
-       last_los_memory_usage = los_memory_usage;
 }
 
 /*