diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-25 02:23:58 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-25 02:23:58 +0000 |
commit | 85173be41f27871cb36ae77b8abfa1e3c0ae2565 (patch) | |
tree | f689ca9f543ab0077c2111c26ce7cc6557909b06 /gc.c | |
parent | b2b8b4a16e03230ac3ab82498dade86ed934c562 (diff) |
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
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |