aboutsummaryrefslogtreecommitdiffstats
path: root/debug_counter.h
diff options
context:
space:
mode:
authorLourens Naudé <lourens@bearmetal.eu>2019-04-20 00:44:51 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-07 21:58:55 +0900
commita47f598d77ac97f9fe89fe16aa8bcab4fd262c16 (patch)
tree069ca07cf1e65cc9d253dab5101d23bed933c21a /debug_counter.h
parent7d805e67f3275aef066d77aa9c32bef715c362ed (diff)
downloadruby-a47f598d77ac97f9fe89fe16aa8bcab4fd262c16.tar.gz
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
Diffstat (limited to 'debug_counter.h')
-rw-r--r--debug_counter.h6
1 files changed, 6 insertions, 0 deletions
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)