71 Commits

Author SHA1 Message Date
Alexander Momchilov
0ea5c13bc6
[DOC] Improve formatting in Markdown files (#12322)
* Fix WASM bullet/code indentation

* Use `console` code highlighting where appropriate

… which handles the prefix `$` correctly.

* Migrate feature proposal template to MarkDown

* Set language on code blocks
2024-12-12 17:49:45 -08:00
Maxime Chevalier-Boisvert
c71f7faaa9
YJIT: add MPLR talk link. Encourage users to use --yjit-mem-size (#12305)
* Add MPLR talk. Encourage users to use --yjit-mem-size.

* Improve text
2024-12-10 18:16:24 -05:00
Kevin Menard
158b8cb52e
YJIT: Add compilation log (#11818)
* YJIT: Add `--yjit-compilation-log` flag to print out the compilation log at exit.

* YJIT: Add an option to enable the compilation log at runtime.

* YJIT: Fix a typo in the `IseqPayload` docs.

* YJIT: Add stubs for getting the YJIT compilation log in memory.

* YJIT: Add a compilation log based on a circular buffer to cap the log size.

* YJIT: Allow specifying either a file or directory name for the YJIT compilation log.

The compilation log will be populated as compilation events occur. If a directory is supplied, then a filename based on the PID will be used as the write target. If a file name is supplied instead, the log will be written to that file.

* YJIT: Add JIT compilation of C function substitutions to the compilation log.

* YJIT: Add compilation events to the circular buffer even if output is sent to a file.

Previously, the two modes were treated as being exclusive of one another. However, it could be beneficial to log all events to a file while also allowing for direct access of the last N events via `RubyVM::YJIT.compilation_log`.

* YJIT: Make timestamps the first element in the YJIT compilation log tuple.

* YJIT: Stream log to stderr if `--yjit-compilation-log` is supplied without an argument.

* YJIT: Eagerly compute compilation log messages to avoid hanging on to references that may GC.

* YJIT: Log all compiled blocks, not just the method entry points.

* YJIT: Remove all compilation events other than block compilation to slim down the log.

* YJIT: Replace circular buffer iterator with a consuming loop.

* YJIT: Support `--yjit-compilation-log=quiet` as a way to activate the in-memory log without printing it.

Co-authored-by: Randy Stauner <randy.stauner@shopify.com>

* YJIT: Promote the compilation log to being the one YJIT log.

Co-authored-by: Randy Stauner <randy.stauner@shopify.com>

* Update doc/yjit/yjit.md

* Update doc/yjit/yjit.md

---------

Co-authored-by: Randy Stauner <randy.stauner@shopify.com>
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2024-10-17 21:36:43 +00:00
Alan Wu
a9fb0a2083
YJIT: Improve build instructions for non-hackers (#11878) 2024-10-11 10:24:47 -04:00
Takashi Kokubun
35711903f2
YJIT: Add --yjit-mem-size option (#11810)
* YJIT: Add --yjit-mem-size option

* Improve --help

* s/the region/this virtual memory region/

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>

---------

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2024-10-07 13:07:23 -04:00
Takashi Kokubun
77ffdfe79f
YJIT: Allow tracing fallback counters (#11347)
* YJIT: Allow tracing fallback counters

* Update yjit.md about --yjit-trace-exits=counter
2024-08-08 16:13:16 -07:00
Maxime Chevalier-Boisvert
a58e3305ce
YJIT: remove doc/yjit/yjit_hacking.md (#11153)
Document is 3 years old and out of date
2024-07-11 19:17:40 +00:00
Maxime Chevalier-Boisvert
c0ad0c3e43
Update yjit.md, explain how to run a single test with test-all (#11151) 2024-07-11 17:02:01 +00:00
Alan Wu
e240fc9c3c [DOC] yjit.md: Markdown fixes for RDoc
It now renders properly on both GitHub and with RDoc's darkfish theme.
2024-07-05 18:38:46 -04:00
Maxime Chevalier-Boisvert
571bfc7402
YJIT: update code optimization tips in yjit.md (#10445)
* YJIT: update code optimization tips in yjit.md

* Function => method
2024-04-03 21:28:01 +00:00
Takashi Kokubun
b0be2961f7
YJIT: Let yjit_perf.py support perf with Python disabled (#10246)
* YJIT: Let yjit_perf.py support perf with Python disabled

* Update yjit.md about perf

* Recommend the extra interface by default
2024-03-14 10:08:23 -07:00
Takashi Kokubun
3668118572
[DOC] Stop discouraging the use of Array#each (#10119) 2024-02-27 17:02:24 -05:00
Takashi Kokubun
7177731282
YJIT: Add --yjit-perf=codegen option (#9957) 2024-02-14 09:09:14 -08:00
Takashi Kokubun
5cbca9110c
YJIT: Allow tracing a counted exit (#9890)
* YJIT: Allow tracing a counted exit

* Avoid clobbering caller-saved registers
2024-02-08 15:47:02 -08:00
Takashi Kokubun
303fef8752
YJIT: Update yjit.md about mem size (#9687) 2024-01-24 10:26:57 -08:00
Maxime Chevalier-Boisvert
1702528258
YJIT: reduce default exec mem size to 48MiB (#9685)
YJIT: reduce default exec mem size to 48MiB based

Based on user feedback from @jhawthorn and others.
Better for small and memory-constrained deployments.

NOTE: This commit should be included in the next Ruby 3.3.x point
release. @xrxr should we tag someone specific?
2024-01-24 18:14:36 +00:00
Takashi Kokubun
d8978445ae
Improve YJIT documentation for Ruby 3.3 (#9263) 2023-12-17 23:45:09 -05:00
Takashi Kokubun
b266890dab
YJIT: Add --yjit-disable to help and reorder it (#9230) 2023-12-13 13:29:37 -08:00
Maxime Chevalier-Boisvert
8d1138c1cf
YJIT: edit yjit.md and bring it up to date (#9068)
Also make various minor edits to improve readability.
2023-11-29 18:09:55 -05:00
Maxime Chevalier-Boisvert
6310522a9a
YJIT: reduce default exec-mem-size to 64MiB (#9054) 2023-11-28 20:04:33 +00:00
Maxime Chevalier-Boisvert
f9628fb4be
YJIT: make --yjit-max-versions=N option undocumented (#8962)
Not useful for the vast majority of end users to change
this option.
2023-11-20 21:26:18 +00:00
Maxime Chevalier-Boisvert
d9d0938116
YJIT: update yjit.md, add MPLR 2023 paper and bibtex (#8861)
* YJIT: update yjit.md, add MPLR 2023 paper and bibtex

* Update doc/yjit/yjit.md
2023-11-07 17:46:07 +00:00
Maxime Chevalier-Boisvert
3e65115cef
YJIT: remove unused --yjit-greedy-versioning command-line option (#8713) 2023-10-19 19:29:31 +00:00
Takashi Kokubun
f51b92fe23
YJIT: Add --yjit-perf (#8697)
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2023-10-18 21:07:03 +00:00
Takashi Kokubun
4d0a619f71
YJIT: Allow --yjit-trace-exits on release builds (#8619) 2023-10-10 14:54:19 -07:00
Takashi Kokubun
ef7fa8bd0e Integer#times is not a C method [ci skip] 2023-10-10 10:27:29 -07:00
Maxime Chevalier-Boisvert
a6d190fa4d
Update yjit.md 2023-10-10 13:10:47 -04:00
Maxime Chevalier-Boisvert
ea491802fa
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>
2023-10-03 17:45:46 -04:00
Takashi Kokubun
0a2c4a6091
[DOC] Add production performance tips to yjit.md (#8472)
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2023-09-18 16:27:18 -07:00
Rafael Mendonça França
774845284f Change yjit stats list to be a unordered list
Without using a list, this show as a single paragraph with all stats descriptions being in one single line
2023-08-23 19:20:55 +02:00
Maxime Chevalier-Boisvert
eee83af34c
Update yjit.md, document --yjit-stats=quiet 2023-08-21 16:24:06 -04:00
Takashi Kokubun
c4ef3d767b
YJIT: Rename exec_instruction to yjit_insns_count (#8102) 2023-07-20 15:54:59 -04:00
Takashi Kokubun
b41fc9b9a4
YJIT: Avoid undercounting retired_in_yjit (#8038)
* YJIT: Count the number of failed instructions

* Rename yjit_insns_count to exec_instructions instead

* Hoist out the exec_instruction counter
2023-07-20 13:14:25 -04:00
BurdetteLamar
8f9d58a962 Repair broken link 2023-06-28 12:01:16 -04:00
Noah Gibbs
3bd98e7a91 Add documentation for some stats counters, and generally about YJIT stats 2023-05-22 14:45:00 -07:00
Hiroshi SHIBATA
172077232e
readline or libedit is no longer required to build ruby 2023-05-10 09:55:27 +09:00
Maxime Chevalier-Boisvert
27ecf3261e
Update yjit.md
Document `make yjit-smoke-test`
2023-03-20 15:40:55 -04:00
Takashi Kokubun
854546fcc4 MJIT is no longer slower on Rails 2023-03-06 23:24:05 -08:00
Maxime Chevalier-Boisvert
97740a525e
Update yjit.md
Update some out of date information and mention how to check that YJIT is enabled.
2023-01-31 15:53:40 -05:00
Maxime Chevalier-Boisvert
c221a40201
Update yjit.md 2023-01-31 10:33:08 -05:00
Maxime Chevalier-Boisvert
a9bcc058bb
Update yjit.md 2023-01-17 16:21:13 -05:00
Maxime Chevalier-Boisvert
40bf89872f
Update yjit.md
Add Alan Wu's keynote & Maxime's talk to the list of YJIT-related talks :)
2023-01-09 14:12:10 -05:00
Takashi Kokubun
8f081d4d0f
Syntax-highlight scripts in yjit.md [ci skip]
Specifically, I wanted to grey out comments in shell scripts. But I just
specified a language for blocks without comments as well to avoid
forgetting that in the future.
2022-12-19 14:55:49 -08:00
Maxime Chevalier-Boisvert
30c76f4d0d
Update yjit.md
Update citation, fix outdated and inaccurate information.
2022-12-07 16:46:59 -05:00
Maxime Chevalier-Boisvert
8a74361b41
Update yjit.md to mention RUBY_YJIT_ENABLE 2022-11-28 16:45:42 -05:00
Maxime Chevalier-Boisvert
c4e99ac454
Update yjit.md 2022-11-22 16:18:31 -05:00
Takashi Kokubun
607fb49dbc
YJIT: Lower the required Rust version from 1.58.1 to 1.58.0 (#6780) 2022-11-21 10:27:39 -08:00
Maxime Chevalier-Boisvert
a1b460bd6e
Update yjit.md
Remove disclaimer
2022-11-13 12:42:47 -05:00
Maxime Chevalier-Boisvert
2812a57b14
Update docs wrt YJIT limitations and building YJIT (#6641)
* Update docs wrt YJIT limitations and building YJIT

* Update building_ruby.md

Fix relative link
2022-10-27 16:50:00 -04:00
Eileen M. Uchitelle
7e81dd9407
Update yjit docs (#6548)
* The list of supported architectures was updated in
5ef048e5b1
but the first paragraph wasn't updated.
* `--yjit-trace-exits` was missing from the command-line options
* Fixes some spacing issues
* Updates call threshold default to 10, verified in the code that's
correct.
* Add code ticks around method names.
* Fix namespace of stats example
2022-10-14 09:43:18 -07:00