summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2023-10-18 19:46:35 -0400
committerGitHub <[email protected]>2023-10-18 23:46:35 +0000
commitd2b0c9da2e0148c8c12ca58e21c482c1e66c2358 (patch)
tree7f0ae18acae1a6d389b449498175cdf82bd66e20 /iseq.c
parent0ac6fb225d15cbcd35b8122b151a17eaa92fafaf (diff)
YJIT: Add a live ISeq counter
It's an estimator for application size and could be used as a compilation heuristic later. Co-authored-by: Maxime Chevalier-Boisvert <[email protected]> Co-authored-by: Takashi Kokubun <[email protected]>
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 0bd4b2812b..1c7bafc5a2 100644
--- a/iseq.c
+++ b/iseq.c
@@ -168,6 +168,8 @@ rb_iseq_free(const rb_iseq_t *iseq)
rb_rjit_free_iseq(iseq); /* Notify RJIT */
#if USE_YJIT
rb_yjit_iseq_free(body->yjit_payload);
+ RUBY_ASSERT(rb_yjit_live_iseq_count > 0);
+ rb_yjit_live_iseq_count--;
#endif
ruby_xfree((void *)body->iseq_encoded);
ruby_xfree((void *)body->insns_info.body);