* YJIT: specialized codegen for integer right shift
Used in optcarrot. May also be used to write pure-Ruby gems.
No overflow check or fixnum untagging required.
* Update yjit/src/codegen.rs
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
---------
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
* YJIT: record num_send_cfunc stat
Also report num_send_known_cfunc as percentage of num_send_cfunc
* Rename num_send_known_cfunc => num_send_cfunc_inline
Name seems more descriptive of what we do with out custom codegen
* Weaken notice about API stability. A few public APIs in here now.
* Prune out APIs from the docs that are private in nature
* Enable markdown mode and ensure `--` options are quoted so they are
rendered as two dashes in the HTML.
For <https://bugs.ruby-lang.org/issues/19921>, I suspect the test is
failing due to a timing related interrupt, which on paper could
happen with slow-enough GC runs.
In any case, it's helpful for debugging to have more information when
tests fail.
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
It's an estimator for application size and could be used as a
compilation heuristic later.
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
* Port call threshold logic from Rust to C for performance
* Prefix global/field names with yjit_
* Fix linker error
* Fix preprocessor condition for rb_yjit_threshold_hit
* Fix third linker issue
* Exclude yjit_calls_at_interv from RJIT bindgen
---------
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
yjit-trace-exits appends a synthetic sample for the instruction being
exited, but we didn't increment the size of the stack. Fixing this count
correctly lets us successfully generate a flamegraph from the exits.
I also replaced the line number for instructions with 0, as I don't
think the previous value had meaning.
Co-authored-by: Adam Hess <HParker@github.com>
The stackprof-format raw samples are suffixed with a count (ie. how many
times did the previously recorded side-exit repeat). Previously we were
correctly using this value to increment the :samples count, but not the
:total_samples count or edges.
This made the stackprof aggregate results incorrect (though any
flamegraphs generated should have been correct, since those only rely on
raw samples).
* YJIT: Add --yjit-pause and RubyVM::YJIT.resume
This allows booting YJIT in a suspended state. We chose to add a new
command line option as opposed to simply allowing YJIT.resume to work
without any command line option because it allows for combining with
YJIT tuning command line options. It also simpifies implementation.
Paired with Kokubun and Maxime.
* Update yjit.rb
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
---------
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Early total_exits condition.
Replace Array#sort_by/first(how_many) with Array#max_by(how_many).
Replace Array#map/max with Array#max_by, match print_counters style for longest_name_length.