Skip to content

Commit

Permalink
add ccs_not_found debug counter
Browse files Browse the repository at this point in the history
ccs_not_found to count not found in ccs table.
  • Loading branch information
ko1 committed Dec 14, 2020
1 parent da3be76 commit c37ba2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debug_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ RB_DEBUG_COUNTER(cc_invalidate_negative) // count for invalidating negative

RB_DEBUG_COUNTER(ccs_free) // count for free'ing ccs
RB_DEBUG_COUNTER(ccs_maxlen) // maximum length of ccs
RB_DEBUG_COUNTER(ccs_found) // count for finding corresponding ccs on method lookup
RB_DEBUG_COUNTER(ccs_found) // count for finding corresponding ccs on method lookup
RB_DEBUG_COUNTER(ccs_not_found) // count for not found corresponding ccs on method lookup

// iseq
RB_DEBUG_COUNTER(iseq_num) // number of total created iseq
Expand Down
2 changes: 2 additions & 0 deletions vm_method.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,8 @@ cached_callable_method_entry(VALUE klass, ID mid)
rb_id_table_delete(cc_tbl, mid);
}
}

RB_DEBUG_COUNTER_INC(ccs_not_found);
return NULL;
}

Expand Down

0 comments on commit c37ba2c

Please sign in to comment.