From d2b0c9da2e0148c8c12ca58e21c482c1e66c2358 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 18 Oct 2023 19:46:35 -0400 Subject: 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 Co-authored-by: Takashi Kokubun --- iseq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'iseq.c') 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); -- cgit v1.2.3