From a47f598d77ac97f9fe89fe16aa8bcab4fd262c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lourens=20Naud=C3=A9?= Date: Sat, 20 Apr 2019 00:44:51 +0100 Subject: Reduce ONIG_NREGION from 10 to 4: power of 2 and testing revealed most pattern matches are less than or equal to 4 results Closes: https://github.com/ruby/ruby/pull/2135 --- debug_counter.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debug_counter.h') diff --git a/debug_counter.h b/debug_counter.h index 83ae701524..f0444d7190 100644 --- a/debug_counter.h +++ b/debug_counter.h @@ -177,6 +177,9 @@ RB_DEBUG_COUNTER(gc_isptr_maybe) * * hash_under4: has under 4 entries * * hash_ge4: has n entries (4<=n<8) * * hash_ge8: has n entries (8<=n) + * * match_under4: has under 4 oniguruma regions allocated + * * match_ge4: has n regions allocated (4<=n<8) + * * match_ge8: has n regions allocated (8<=n) * * data_empty: T_DATA but no memory free. * * data_xfree: free'ed by xfree(). * * data_imm_free: free'ed immediately. @@ -225,6 +228,9 @@ RB_DEBUG_COUNTER(obj_data_xfree) RB_DEBUG_COUNTER(obj_data_imm_free) RB_DEBUG_COUNTER(obj_data_zombie) +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) -- cgit v1.2.3