17static const char *
const debug_counter_names[] = {
19#define RB_DEBUG_COUNTER(name) #name,
21#undef RB_DEBUG_COUNTER
25size_t rb_debug_counter[
numberof(debug_counter_names)];
28int 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],
108debug_counter_show_results_at_exit(
void)
110 if (debug_counter_disable_show_at_exit == 0) {
void rb_debug_counter_show_results(const char *msg)
size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr)
void ruby_debug_counter_show_at_exit(int enable)
void ruby_debug_counter_reset(void)