summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2023-10-03 17:45:46 -0400
committerGitHub <noreply@github.com>2023-10-03 17:45:46 -0400
commitea491802fa4a6ce7070b318ffcad30cbeaf42635 (patch)
treee9a921cc4ef2773701e714d214f4e1f36ff9b246 /ruby.c
parentd47af931105583c1504965300492422e5af86b81 (diff)
YJIT: add heuristic to avoid compiling cold ISEQs (#8522)
* YJIT: Add counter to measure how often we compile "cold" ISEQs (#535) Fix counter name in DEFAULT_COUNTERS YJIT: add --yjit-cold-threshold, don't compile cold ISEQs YJIT: increase default cold threshold to 200_000 Remove rb_yjit_call_threshold() Remove conflict markers Fix compilation errors Threshold 1 should compile immediately Debug deadlock issue with test_ractor Fix call threshold issue with tests * Revert exception threshold logic. Document option in yjid.md * (void) for 0 parameter functions in C99 * Rename iseq_entry_cold => cold_iseq_entry * Document --yjit-cold-threshold in ruby.c * Update doc/yjit/yjit.md Co-authored-by: Jean byroot Boussier <jean.boussier+github@shopify.com> * Shorten help string to appease test * Address bug found by Kokubun. Reorder logic. --------- Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Co-authored-by: Jean byroot Boussier <jean.boussier+github@shopify.com>
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 379f76c577..44b1e06031 100644
--- a/ruby.c
+++ b/ruby.c
@@ -374,6 +374,7 @@ usage(const char *name, int help, int highlight, int columns)
M("--yjit-trace-exits-sample-rate", "", "Trace exit locations only every Nth occurrence"),
M("--yjit-exec-mem-size=num", "", "Size of executable memory block in MiB (default: 128)"),
M("--yjit-call-threshold=num", "", "Number of calls to trigger JIT (default: 30)"),
+ M("--yjit-cold-threshold=num", "", "Global call after which ISEQs not compiled (default: 200K)"),
M("--yjit-max-versions=num", "", "Maximum number of versions per basic block (default: 4)"),
M("--yjit-greedy-versioning", "", "Greedy versioning mode (default: disabled)"),
};