17 static const char *
const debug_counter_names[] = {
19 #define RB_DEBUG_COUNTER(name) #name,
21 #undef RB_DEBUG_COUNTER
25 size_t rb_debug_counter[
numberof(debug_counter_names)];
28 int debug_counter_disable_show_at_exit = 0;
43 rb_debug_counter[
i] = 0;
54 if (names_ptr !=
NULL) {
56 names_ptr[
i] = debug_counter_names[
i];
59 if (counters_ptr !=
NULL) {
61 counters_ptr[
i] = rb_debug_counter[
i];
71 debug_counter_disable_show_at_exit = !enable;
77 const char *
env =
getenv(
"RUBY_DEBUG_COUNTER_DISABLE");
79 setlocale(LC_NUMERIC,
"");
86 debug_counter_names[
i],
108 debug_counter_show_results_at_exit(
void)
110 if (debug_counter_disable_show_at_exit == 0) {