[前][次][番号順一覧][スレッド一覧]

ruby-changes:53148

From: ko1 <ko1@a...>
Date: Thu, 25 Oct 2018 11:24:03 +0900 (JST)
Subject: [ruby-changes:53148] ko1:r65362 (trunk): add new counter about GC.

ko1	2018-10-25 11:23:58 +0900 (Thu, 25 Oct 2018)

  New Revision: 65362

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65362

  Log:
    add new counter about GC.
    
    * debug_counter.h: add `gc_major_oldmalloc`.

  Modified files:
    trunk/debug_counter.h
    trunk/gc.c
Index: debug_counter.h
===================================================================
--- debug_counter.h	(revision 65361)
+++ debug_counter.h	(revision 65362)
@@ -119,6 +119,7 @@ RB_DEBUG_COUNTER(gc_major_nofree) https://github.com/ruby/ruby/blob/trunk/debug_counter.h#L119
 RB_DEBUG_COUNTER(gc_major_oldgen)
 RB_DEBUG_COUNTER(gc_major_shady)
 RB_DEBUG_COUNTER(gc_major_force)
+RB_DEBUG_COUNTER(gc_major_oldmalloc)
 
 /* object allocation counts:
  *
Index: gc.c
===================================================================
--- gc.c	(revision 65361)
+++ gc.c	(revision 65362)
@@ -6538,11 +6538,15 @@ gc_start(rb_objspace_t *objspace, int re https://github.com/ruby/ruby/blob/trunk/gc.c#L6538
 
 #if USE_DEBUG_COUNTER
     RB_DEBUG_COUNTER_INC(gc_count);
+
     if (reason & GPR_FLAG_MAJOR_MASK) {
         (void)RB_DEBUG_COUNTER_INC_IF(gc_major_nofree, reason & GPR_FLAG_MAJOR_BY_NOFREE);
         (void)RB_DEBUG_COUNTER_INC_IF(gc_major_oldgen, reason & GPR_FLAG_MAJOR_BY_OLDGEN);
         (void)RB_DEBUG_COUNTER_INC_IF(gc_major_shady,  reason & GPR_FLAG_MAJOR_BY_SHADY);
         (void)RB_DEBUG_COUNTER_INC_IF(gc_major_force,  reason & GPR_FLAG_MAJOR_BY_FORCE);
+#if RGENGC_ESTIMATE_OLDMALLOC
+        (void)RB_DEBUG_COUNTER_INC_IF(gc_major_oldmalloc, reason & GPR_FLAG_MAJOR_BY_OLDMALLOC);
+#endif
     }
     else {
         (void)RB_DEBUG_COUNTER_INC_IF(gc_minor_newobj, reason & GPR_FLAG_NEWOBJ);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]