Commit graph

49 commits

Author SHA1 Message Date
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
Takashi Kokubun
7cab7e5fde
Stop recommending duplicated options [ci skip] (#6400) 2022-09-19 15:13:53 +09:00
Takashi Kokubun
ce70cb6469
It was a relative path [ci skip] 2022-08-31 17:18:22 -07:00
Takashi Kokubun
a0d2320f30
Add a document about YJIT's Rust version 2022-08-31 17:16:29 -07:00
Maxime Chevalier-Boisvert
5ef048e5b1 Update yjit.md
Add VMIL paper, update supported CPUs.
2022-08-29 09:09:41 -07:00
Takashi Kokubun
f8936b3341
Remove documentation about dev
dev is Shopify's internal tool that doesn't work if you use Intel
Homebrew on M1 (or rbenv, btw). Now that we maintain this outside
Shopify's repository, we should stop talking about it here.
2022-08-08 19:02:30 -07:00
Alan Wu
b793245dac
[DOC] Some YJIT dependencies are no longer required
The `capstone` crate on crates.io does not need `libcapstone` on the system
because it builds from [source].
`gdbm` is now a separate gem (thanks for extracting it!).

[source]: c31409905a/capstone-sys/build.rs (L143)
2022-05-02 14:00:35 -04:00
Maxime Chevalier-Boisvert
e1536a1e56
Update yjit.md
Fix configure line in YJIT build instructions
2022-04-27 13:16:42 -04:00
Alan Wu
f90549cd38 Rust YJIT
In December 2021, we opened an [issue] to solicit feedback regarding the
porting of the YJIT codebase from C99 to Rust. There were some
reservations, but this project was given the go ahead by Ruby core
developers and Matz. Since then, we have successfully completed the port
of YJIT to Rust.

The new Rust version of YJIT has reached parity with the C version, in
that it passes all the CRuby tests, is able to run all of the YJIT
benchmarks, and performs similarly to the C version (because it works
the same way and largely generates the same machine code). We've even
incorporated some design improvements, such as a more fine-grained
constant invalidation mechanism which we expect will make a big
difference in Ruby on Rails applications.

Because we want to be careful, YJIT is guarded behind a configure
option:

```shell
./configure --enable-yjit # Build YJIT in release mode
./configure --enable-yjit=dev # Build YJIT in dev/debug mode
```

By default, YJIT does not get compiled and cargo/rustc is not required.
If YJIT is built in dev mode, then `cargo` is used to fetch development
dependencies, but when building in release, `cargo` is not required,
only `rustc`. At the moment YJIT requires Rust 1.60.0 or newer.

The YJIT command-line options remain mostly unchanged, and more details
about the build process are documented in `doc/yjit/yjit.md`.

The CI tests have been updated and do not take any more resources than
before.

The development history of the Rust port is available at the following
commit for interested parties:
1fd9573d8b

Our hope is that Rust YJIT will be compiled and included as a part of
system packages and compiled binaries of the Ruby 3.2 release. We do not
anticipate any major problems as Rust is well supported on every
platform which YJIT supports, but to make sure that this process works
smoothly, we would like to reach out to those who take care of building
systems packages before the 3.2 release is shipped and resolve any
issues that may come up.

[issue]: https://bugs.ruby-lang.org/issues/18481

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Co-authored-by: Noah Gibbs <the.codefolio.guy@gmail.com>
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2022-04-27 11:00:22 -04:00
Adrien S
fc7e42a473
Fix yjit readme link pointing to old shopify readme (#5596) 2022-02-24 14:12:17 -05:00
Kazuhiro NISHIYAMA
aff4b2194f
Fix a typo [ci skip] 2022-02-02 09:08:12 +09:00
Noah Gibbs
14967347b9
YJIT stats documentation additions and updates (#5427)
* YJIT documentation additions and updates

* Update yjit.md

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-01-11 14:17:59 -05:00
Adam Hess
8bde66167f
update YJIT docs to reference RubyVM::YJIT instead of just YJIT
[ci skip]
2021-11-24 20:23:22 -05:00
Maxime Chevalier-Boisvert
cdebf57ec6
Add --yjit-no-type-prop so we can test YJIT without type propagation (#5135)
* Add --yjit-no-type-prop so we can test YJIT without type propagation

* Fix typo in command line option

* Leave just two test workflows enable for YJIT
2021-11-18 10:44:31 -05:00
Nobuyoshi Nakada
4d4bdcf368
Move the test file 2021-10-21 13:07:48 +09:00
Maxime Chevalier-Boisvert
2e2430564a Update yjit.md 2021-10-20 18:19:43 -04:00
Alan Wu
adcee68aa0 Doc: remove outdated note about hooking into the interpreter
DAE remember MicroJIT?
2021-10-20 18:19:43 -04:00
Alan Wu
8a9a2d0049 Move test_yjit_asm.sh into misc
Since conventionally scripts don't live at the top level of the repo.
2021-10-20 18:19:43 -04:00
Maxime Chevalier-Boisvert
d11ea2520e Update yjit.md 2021-10-20 18:19:43 -04:00
Noah Gibbs
3dd4abfcd0 Move YJIT's README into doc/yjit/yjit.md 2021-10-20 18:19:42 -04:00
Noah Gibbs
6392702375 Incorporate feedback from the PR into yjit_hacking.md 2021-10-20 18:19:42 -04:00
Noah Gibbs
d4a75dd976 Add a YJIT hacking doc with some internals; change the README text a bit to reflect its current condition 2021-10-20 18:19:42 -04:00