RJIT: Always enable --rjit-dump-disasm
This commit is contained in:
parent
d0b8bdb392
commit
d5b7c8a972
@ -3867,11 +3867,11 @@ AC_ARG_ENABLE(rjit,
|
|||||||
|
|
||||||
AS_CASE(["$RJIT_SUPPORT"],
|
AS_CASE(["$RJIT_SUPPORT"],
|
||||||
[yes|dev], [
|
[yes|dev], [
|
||||||
|
# Link libcapstone for --rjit-dump-disasm
|
||||||
|
AC_CHECK_LIB([capstone], [cs_disasm])
|
||||||
|
|
||||||
AS_CASE(["$RJIT_SUPPORT"],
|
AS_CASE(["$RJIT_SUPPORT"],
|
||||||
[dev], [
|
[dev], [
|
||||||
# Link libcapstone for --rjit-dump-disasm
|
|
||||||
AC_CHECK_LIB([capstone], [cs_disasm])
|
|
||||||
|
|
||||||
# Enable RJIT_STATS (vm_insns_count of --rjit-stats)
|
# Enable RJIT_STATS (vm_insns_count of --rjit-stats)
|
||||||
AC_DEFINE(RUBY_DEBUG, 1)
|
AC_DEFINE(RUBY_DEBUG, 1)
|
||||||
])
|
])
|
||||||
|
@ -14,15 +14,7 @@ The following platforms are assumed to work. `linux-x86_64` is tested on CI.
|
|||||||
* OS: Linux, macOS, BSD
|
* OS: Linux, macOS, BSD
|
||||||
* Arch: x86\_64
|
* Arch: x86\_64
|
||||||
|
|
||||||
## Developing RJIT
|
## configure
|
||||||
|
|
||||||
### Bindgen
|
|
||||||
|
|
||||||
If you see an "RJIT bindgen" GitHub Actions failure, please commit the `git diff` shown on the failed job.
|
|
||||||
|
|
||||||
For doing the same thing locally, run `make rjit-bindgen` after installing libclang.
|
|
||||||
macOS seems to have libclang by default. On Ubuntu, you can install it with `apt install libclang1`.
|
|
||||||
|
|
||||||
### --enable-rjit
|
### --enable-rjit
|
||||||
|
|
||||||
On supported platforms, `--enable-rjit` is set by default. You usually don't need to specify this.
|
On supported platforms, `--enable-rjit` is set by default. You usually don't need to specify this.
|
||||||
@ -30,7 +22,24 @@ You may still manually pass `--enable-rjit` to try RJIT on unsupported platforms
|
|||||||
|
|
||||||
### --enable-rjit=dev
|
### --enable-rjit=dev
|
||||||
|
|
||||||
`--enable-rjit=dev` makes the interpreter slower, but enables the following two features:
|
`--enable-rjit=dev` makes the interpreter slower, but enables `ruby --rjit-stats` to work.
|
||||||
|
|
||||||
* `--rjit-dump-disasm`: Dump all JIT code.
|
## make
|
||||||
* `--rjit-stats`: Print RJIT stats.
|
### rjit-bindgen
|
||||||
|
|
||||||
|
If you see an "RJIT bindgen" GitHub Actions failure, please commit the `git diff` shown on the failed job.
|
||||||
|
|
||||||
|
For doing the same thing locally, run `make rjit-bindgen` after installing libclang.
|
||||||
|
macOS seems to have libclang by default. On Ubuntu, you can install it with `apt install libclang1`.
|
||||||
|
|
||||||
|
## ruby
|
||||||
|
### --rjit-stats
|
||||||
|
|
||||||
|
This prints RJIT stats at exit. Available with `--enable-rjit=dev` on configure.
|
||||||
|
|
||||||
|
### --rjit-dump-disasm
|
||||||
|
|
||||||
|
This dumps all JIT code. You need to install libcapstone before configure.
|
||||||
|
|
||||||
|
* Ubuntu: `sudo apt-get install -y libcapstone-dev`
|
||||||
|
* macOS: `brew install capstone`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user