summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2025-02-14 17:35:45 -0800
committerTakashi Kokubun <[email protected]>2025-04-18 21:52:58 +0900
commit53bee25068d11877b034af53797cf6e5d3d8e2be ()
treeacfbe1cc6e35f2422c637078fc8cef4b988d03f5 /vm.c
parent06d875b97901b7c6accb36c8b7b525d0884696a7 (diff)
Implement --zjit-call-threshold
As a preparation for introducing a profiling layer, we need to be able to raise the threshold to run a few cycles for profiling.
Notes: Merged: https://.com/ruby/ruby/pull/13131
-rw-r--r--vm.c3
1 files changed, 2 insertions, 1 deletions
@@ -437,9 +437,10 @@ jit_compile(rb_execution_context_t *ec)
// Increment the ISEQ's call counter and trigger JIT compilation if not compiled
#if USE_ZJIT
extern bool rb_zjit_enabled_p;
if (body->jit_entry == NULL && rb_zjit_enabled_p) {
body->jit_entry_calls++;
- if (body->jit_entry_calls == 1) {
extern void rb_zjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec, bool jit_exception);
rb_zjit_compile_iseq(iseq, ec, false);
}