[ruby-core:114564] [Ruby master Feature#18440] YJIT is enabled if any YJIT tuning options are set
From:
"byroot (Jean Boussier) via ruby-core" <ruby-core@...>
Date:
2023-08-26 09:54:21 UTC
List:
ruby-core #114564
Issue #18440 has been updated by byroot (Jean Boussier).
For what it's worth, I would expect `--yjit-*` options not to turn on YJIT. I agree that it's surprising, I would expect only `--yjit` or `RUBY_YJIT_ENABLE=1` to actually enable it.
----------------------------------------
Feature #18440: YJIT is enabled if any YJIT tuning options are set
https://bugs.ruby-lang.org/issues/18440#change-104378
* Author: georgeclaghorn (George Claghorn)
* Status: Feedback
* Priority: Normal
----------------------------------------
I was testing YJIT in a Rails app with `RUBYOPT="--yjit --yjit-exec-mem-size=32"`. I saw some weird issues around Rails view caching, so I attempted to temporarily disable YJIT by removing `--yjit` and leaving the tuning options in place (`RUBYOPT="--yjit-exec-mem-size=32"`). However, YJIT remained enabled until I also removed `--yjit-exec-mem-size=32`.
```
$ ruby -e 'puts RubyVM::YJIT.runtime_stats.inspect'
nil
$ ruby --yjit-exec-mem-size -e 'puts RubyVM::YJIT.runtime_stats.inspect'
{:inline_code_size=>378495, :outlined_code_size=>311079}
```
I expected removing `--yjit` to disable YJIT and was surprised by this.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/