зеркало из https://github.com/github/ruby.git
add more debug counters to count numeric objects.
This commit is contained in:
Родитель
7779ade48c
Коммит
9eeaae432b
|
@ -247,8 +247,6 @@ RB_DEBUG_COUNTER(obj_struct_embed)
|
|||
RB_DEBUG_COUNTER(obj_struct_transient)
|
||||
RB_DEBUG_COUNTER(obj_struct_ptr)
|
||||
|
||||
RB_DEBUG_COUNTER(obj_regexp_ptr)
|
||||
|
||||
RB_DEBUG_COUNTER(obj_data_empty)
|
||||
RB_DEBUG_COUNTER(obj_data_xfree)
|
||||
RB_DEBUG_COUNTER(obj_data_imm_free)
|
||||
|
@ -258,9 +256,19 @@ RB_DEBUG_COUNTER(obj_match_under4)
|
|||
RB_DEBUG_COUNTER(obj_match_ge4)
|
||||
RB_DEBUG_COUNTER(obj_match_ge8)
|
||||
RB_DEBUG_COUNTER(obj_match_ptr)
|
||||
RB_DEBUG_COUNTER(obj_file_ptr)
|
||||
RB_DEBUG_COUNTER(obj_bignum_ptr)
|
||||
|
||||
RB_DEBUG_COUNTER(obj_iclass_ptr)
|
||||
RB_DEBUG_COUNTER(obj_class_ptr)
|
||||
RB_DEBUG_COUNTER(obj_module_ptr)
|
||||
|
||||
RB_DEBUG_COUNTER(obj_bignum_ptr)
|
||||
RB_DEBUG_COUNTER(obj_bignum_embed)
|
||||
RB_DEBUG_COUNTER(obj_float)
|
||||
RB_DEBUG_COUNTER(obj_complex)
|
||||
RB_DEBUG_COUNTER(obj_rational)
|
||||
|
||||
RB_DEBUG_COUNTER(obj_regexp_ptr)
|
||||
RB_DEBUG_COUNTER(obj_file_ptr)
|
||||
RB_DEBUG_COUNTER(obj_symbol)
|
||||
|
||||
RB_DEBUG_COUNTER(obj_imemo_ment)
|
||||
|
@ -275,10 +283,6 @@ RB_DEBUG_COUNTER(obj_imemo_ifunc)
|
|||
RB_DEBUG_COUNTER(obj_imemo_memo)
|
||||
RB_DEBUG_COUNTER(obj_imemo_parser_strterm)
|
||||
|
||||
RB_DEBUG_COUNTER(obj_iclass_ptr)
|
||||
RB_DEBUG_COUNTER(obj_class_ptr)
|
||||
RB_DEBUG_COUNTER(obj_module_ptr)
|
||||
|
||||
/* ar_table */
|
||||
RB_DEBUG_COUNTER(artable_hint_hit)
|
||||
RB_DEBUG_COUNTER(artable_hint_miss)
|
||||
|
|
8
gc.c
8
gc.c
|
@ -2750,7 +2750,11 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
|
|||
}
|
||||
break;
|
||||
case T_RATIONAL:
|
||||
RB_DEBUG_COUNTER_INC(obj_rational);
|
||||
break;
|
||||
case T_COMPLEX:
|
||||
RB_DEBUG_COUNTER_INC(obj_complex);
|
||||
break;
|
||||
case T_MOVED:
|
||||
break;
|
||||
case T_ICLASS:
|
||||
|
@ -2774,6 +2778,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
|
|||
break;
|
||||
|
||||
case T_FLOAT:
|
||||
RB_DEBUG_COUNTER_INC(obj_float);
|
||||
break;
|
||||
|
||||
case T_BIGNUM:
|
||||
|
@ -2781,6 +2786,9 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
|
|||
xfree(BIGNUM_DIGITS(obj));
|
||||
RB_DEBUG_COUNTER_INC(obj_bignum_ptr);
|
||||
}
|
||||
else {
|
||||
RB_DEBUG_COUNTER_INC(obj_bignum_embed);
|
||||
}
|
||||
break;
|
||||
|
||||
case T_NODE:
|
||||
|
|
Загрузка…
Ссылка в новой задаче