зеркало из https://github.com/github/ruby.git
add new counter about GC.
* debug_counter.h: add `gc_major_oldmalloc`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b2b8b4a16e
Коммит
85173be41f
|
@ -119,6 +119,7 @@ RB_DEBUG_COUNTER(gc_major_nofree)
|
|||
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:
|
||||
*
|
||||
|
|
4
gc.c
4
gc.c
|
@ -6538,11 +6538,15 @@ gc_start(rb_objspace_t *objspace, int reason)
|
|||
|
||||
#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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче