Skip to content

Commit

Permalink
RJIT: Clean up unnecessary documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Dec 22, 2023
1 parent 18a97af commit 3c18277
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions doc/.document
Expand Up @@ -7,4 +7,5 @@ syntax
optparse
rdoc
regexp
rjit
yjit
12 changes: 2 additions & 10 deletions doc/rjit/README.md → doc/rjit/rjit.md
Expand Up @@ -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

Expand All @@ -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`
1 change: 1 addition & 0 deletions lib/ruby_vm/rjit/.document
@@ -0,0 +1 @@
stats.rb
2 changes: 2 additions & 0 deletions 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 = {}

Expand Down Expand Up @@ -30,6 +31,7 @@ def self.runtime_stats
stats
end

# :nodoc: all
class << self
private

Expand Down
4 changes: 2 additions & 2 deletions 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;
Expand Down

0 comments on commit 3c18277

Please sign in to comment.