Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Takashi Kokubun 94a513b08f
YJIT: Enable debug symbols in dev_nodebug (#7822) 2023-05-19 09:05:39 +09:00
Takashi Kokubun 51834ff2ec
YJIT: Make dev_nodebug closer to dev (#7570) 2023-03-20 13:03:22 -07:00
Alan Wu 14fe7a081a YJIT: Use ThinLTO for Rust parts in release mode
This reduces the code size of libyjit.a by a lot. On darwin it went from
23 MiB to 12 MiB for me. I chose ThinLTO over fat LTO for the relatively
fast build time; in case we need to debug release-build-only problems
it won't be painful.
2023-01-16 17:32:15 -05:00
Alan Wu 258ac07907
YJIT: Generate debug info in release builds (#6910)
* YJIT: Generate debug info in release builds

They are helpful in case we need to do core dump debugging.

* Remove Cirrus DOC skip rule

The syntax for this is weird, and escaping [ and ] cause parse failures.
Cirrus' docs said to surround with .*, but then that seems to skip
everything. Revert e0a4205eb7 for now.
2022-12-12 15:59:29 -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
Takashi Kokubun 6246788bc4
YJIT: Instrument global allocations on stats build (#6712)
* YJIT: Instrument global allocations on stats build

* Just use GLOVAL_ALLOCATOR.stats()
2022-11-13 12:54:41 -05:00
Alan Wu 5ca23caa20
YJIT: fold the "asm_comments" feature into "disasm" (#6591)
Previously, enabling only "disasm" didn't actually build. Since these
two features are closely related and we don't really use one without the
other, let's simplify and merge the two features together.
2022-10-19 14:03:07 -04:00
John Hawthorn 0e85586ecc Add --enable-yjit=dev_nodebug configure option 2022-07-29 16:32:14 -07:00
John Hawthorn fbd24793cb Add --enable-yjit=stats configure option 2022-07-29 16:32:14 -07:00
Alan Wu 899c90cf8a
YJIT: Relax minimum Rust version requirement to 1.58.1
We want to make it convenient for people to build YJIT and Rust version 1.58.1
or above is available on Ubuntu Jammy, Debian testing, and Fedora 36 through
the usual package manager on those systems. This saves the need to install
`rustup` for some people.

Our code is already 1.58.1 compatible so this commit simply tweaks CI to make
sure that we keep supporting that version. We still test against the latest Rust
version in `--enable-yjit=dev` builds through the Rust version available in
GitHub's CI image.

Rust versions older than 1.58.1 might build YJIT today, but we might make
incompatible changes in the future.

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2022-05-29 13:43:02 -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