RJIT: Clean up unnecessary documentation

This commit is contained in:
Takashi Kokubun 2023-12-21 16:18:30 -08:00
parent 18a97affa3
commit 3c18277629
5 changed files with 8 additions and 12 deletions

View File

@ -7,4 +7,5 @@ syntax
optparse optparse
rdoc rdoc
regexp regexp
rjit
yjit yjit

View File

@ -24,13 +24,6 @@ You may still manually pass `--enable-rjit` to try RJIT on unsupported platforms
It enables `--rjit-dump-disasm` if libcapstone is available. It enables `--rjit-dump-disasm` if libcapstone is available.
It also enables `vm_insns_count` and `ratio_in_rjit` in `--rjit-stats`.
However, it makes the interpreter a little slower.
### --enable-rjit=disasm
It enables `--rjit-dump-disasm` if libcapstone is available.
## make ## make
### rjit-bindgen ### rjit-bindgen
@ -42,12 +35,11 @@ macOS seems to have libclang by default. On Ubuntu, you can install it with `apt
## ruby ## ruby
### --rjit-stats ### --rjit-stats
This prints RJIT stats at exit. Some stats are available only with `--enable-rjit=dev` on configure. This prints RJIT stats at exit.
### --rjit-dump-disasm ### --rjit-dump-disasm
This dumps all JIT code. You need to install libcapstone before configure and use `--enable-rjit=dev` This dumps all JIT code. You need to install libcapstone before configure and use `--enable-rjit=dev` on configure.
or `--enable-rjit=disasm` on configure.
* Ubuntu: `sudo apt-get install -y libcapstone-dev` * Ubuntu: `sudo apt-get install -y libcapstone-dev`
* macOS: `brew install capstone` * macOS: `brew install capstone`

View File

@ -0,0 +1 @@
stats.rb

View File

@ -1,5 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
module RubyVM::RJIT module RubyVM::RJIT
# Return a Hash for \RJIT statistics. \--rjit-stats makes more information available.
def self.runtime_stats def self.runtime_stats
stats = {} stats = {}
@ -30,6 +31,7 @@ module RubyVM::RJIT
stats stats
end end
# :nodoc: all
class << self class << self
private private

View File

@ -1,10 +1,10 @@
module RubyVM::RJIT module RubyVM::RJIT
# Return true if RJIT is enabled. # Return true if \RJIT is enabled.
def self.enabled? def self.enabled?
Primitive.cexpr! 'RBOOL(rb_rjit_enabled)' Primitive.cexpr! 'RBOOL(rb_rjit_enabled)'
end end
# Start generating JITed code again after --rjit-disable. # Start JIT compilation after \--rjit-disable.
def self.enable def self.enable
Primitive.cstmt! %{ Primitive.cstmt! %{
rb_rjit_call_p = true; rb_rjit_call_p = true;