diff options
| author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2023-10-03 17:45:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-03 17:45:46 -0400 |
| commit | ea491802fa4a6ce7070b318ffcad30cbeaf42635 (patch) | |
| tree | e9a921cc4ef2773701e714d214f4e1f36ff9b246 /doc | |
| parent | d47af931105583c1504965300492422e5af86b81 (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 'doc')
| -rw-r--r-- | doc/yjit/yjit.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/yjit/yjit.md b/doc/yjit/yjit.md index 05bc37a3f0..41fd742423 100644 --- a/doc/yjit/yjit.md +++ b/doc/yjit/yjit.md @@ -165,9 +165,11 @@ YJIT supports all command-line options supported by upstream CRuby, but also add - `--yjit`: enable YJIT (disabled by default) - `--yjit-call-threshold=N`: number of calls after which YJIT begins to compile a function (default 30) +- `--yjit-cold-threshold=N`: number of global calls after which an ISEQ is considered cold and not +compiled, lower values mean less code is compiled (default 200000) - `--yjit-exec-mem-size=N`: size of the executable memory block to allocate, in MiB (default 64 MiB in Ruby 3.2, 128 MiB in Ruby 3.3+) - `--yjit-stats`: print statistics after the execution of a program (incurs a run-time cost) -- `--yjit-stats=quiet`: gather statistics while running a program but don't print them. Stats are accessible through `RubyVM::YJIT.runtime_stats`. (incurs a run-time cost) +- `--yjit-stats=quiet`: gather statistics while running a program but don't print them. Stats are accessible through `RubyVM::YJIT.runtime_stats`. (incurs a run-time cost) - `--yjit-trace-exits`: produce a Marshal dump of backtraces from specific exits. Automatically enables `--yjit-stats` (must configure and build with `--enable-yjit=stats` to use this) - `--yjit-max-versions=N`: maximum number of versions to generate per basic block (default 4) - `--yjit-greedy-versioning`: greedy versioning mode (disabled by default, may increase code size) |
