summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/.document1
-rw-r--r--doc/rjit/rjit.md (renamed from doc/rjit/README.md)12
-rw-r--r--lib/ruby_vm/rjit/.document1
-rw-r--r--lib/ruby_vm/rjit/stats.rb2
-rw-r--r--rjit.rb4
5 files changed, 8 insertions, 12 deletions
diff --git a/doc/.document b/doc/.document
index 061fa7d3ef..5a58e6e3ad 100644
--- a/doc/.document
+++ b/doc/.document
@@ -7,4 +7,5 @@ syntax
optparse
rdoc
regexp
+rjit
yjit
diff --git a/doc/rjit/README.md b/doc/rjit/rjit.md
index e3795e35b8..9e60e43ce3 100644
--- a/doc/rjit/README.md
+++ b/doc/rjit/rjit.md
@@ -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 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
### rjit-bindgen
@@ -42,12 +35,11 @@ macOS seems to have libclang by default. On Ubuntu, you can install it with `apt
## ruby
### --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
-This dumps all JIT code. You need to install libcapstone before configure and use `--enable-rjit=dev`
-or `--enable-rjit=disasm` on configure.
+This dumps all JIT code. You need to install libcapstone before configure and use `--enable-rjit=dev` on configure.
* Ubuntu: `sudo apt-get install -y libcapstone-dev`
* macOS: `brew install capstone`
diff --git a/lib/ruby_vm/rjit/.document b/lib/ruby_vm/rjit/.document
new file mode 100644
index 0000000000..0a603afe3d
--- /dev/null
+++ b/lib/ruby_vm/rjit/.document
@@ -0,0 +1 @@
+stats.rb
diff --git a/lib/ruby_vm/rjit/stats.rb b/lib/ruby_vm/rjit/stats.rb
index 484ddb3a1d..7e353c698e 100644
--- a/lib/ruby_vm/rjit/stats.rb
+++ b/lib/ruby_vm/rjit/stats.rb
@@ -1,5 +1,6 @@
# frozen_string_literal: true
module RubyVM::RJIT
+ # Return a Hash for \RJIT statistics. \--rjit-stats makes more information available.
def self.runtime_stats
stats = {}
@@ -30,6 +31,7 @@ module RubyVM::RJIT
stats
end
+ # :nodoc: all
class << self
private
diff --git a/rjit.rb b/rjit.rb
index 60d76c3f43..12fc10c91e 100644
--- a/rjit.rb
+++ b/rjit.rb
@@ -1,10 +1,10 @@
module RubyVM::RJIT
- # Return true if RJIT is enabled.
+ # Return true if \RJIT is enabled.
def self.enabled?
Primitive.cexpr! 'RBOOL(rb_rjit_enabled)'
end
- # Start generating JITed code again after --rjit-disable.
+ # Start JIT compilation after \--rjit-disable.
def self.enable
Primitive.cstmt! %{
rb_rjit_call_p = true;