Merge pull request #3057 from BrzVlad/fix-major-log3
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 30 May 2016 16:04:28 +0000 (19:04 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Mon, 30 May 2016 16:04:28 +0000 (19:04 +0300)
[sgen] Refactor collection logging

1  2 
mono/metadata/sgen-mono.c

index 2a71d2fbd46b480c88c8937125c2111cec528d77,bf8ae7a5acd2a076b43014d82c5113a13a3fc41d..862871c771206b1b1fb73ecf4ccee1ed57bbf895
@@@ -901,7 -901,7 +901,7 @@@ mono_gc_clear_domain (MonoDomain * doma
                sgen_object_layout_dump (stdout);
        }
  
-       sgen_restart_world (0, NULL);
+       sgen_restart_world (0);
  
        binary_protocol_domain_unload_end (domain);
        binary_protocol_flush_buffers (FALSE);
@@@ -2253,7 -2253,7 +2253,7 @@@ static voi
  sgen_thread_detach (SgenThreadInfo *p)
  {
        /* If a delegate is passed to native code and invoked on a thread we dont
 -       * know about, the jit will register it with mono_jit_thread_attach, but
 +       * know about, marshal will register it with mono_threads_attach_coop, but
         * we have no way of knowing when that thread goes away.  SGen has a TSD
         * so we assume that if the domain is still registered, we can detach
         * the thread
@@@ -2717,37 -2717,6 +2717,6 @@@ sgen_client_degraded_allocation (size_
        }
  }
  
- void
- sgen_client_log_timing (GGTimingInfo *info, mword promoted_size, mword major_used_size)
- {
-       SgenMajorCollector *major_collector = sgen_get_major_collector ();
-       mword num_major_sections = major_collector->get_num_major_sections ();
-       char full_timing_buff [1024];
-       full_timing_buff [0] = '\0';
-       if (!info->is_overflow)
-               sprintf (full_timing_buff, "total %.2fms", info->stw_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 size: %dK in use: %dK",
-                       info->is_overflow ? "_OVERFLOW" : "",
-                       info->reason ? info->reason : "",
-                       (int)info->total_time / 10000.0f,
-                       full_timing_buff,
-                       los_memory_usage_total / 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 size: %dK in use: %dK los size: %dK in use: %dK",
-                               info->is_overflow ? "_OVERFLOW" : "",
-                       info->reason ? info->reason : "",
-                       (int)info->total_time / 10000.0f,
-                       full_timing_buff,
-                       (int)promoted_size / 1024,
-                       major_collector->section_size * num_major_sections / 1024,
-                       major_used_size / 1024,
-                       los_memory_usage_total / 1024,
-                       los_memory_usage / 1024);
- }
  /*
   * Debugging
   */