summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maximechevalierb@gmail.com>2021-02-26 11:57:59 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:30 -0400
commit6f437d5b30355070f15921a421c5c4ea7a3147d8 (patch)
treef8df0d11c85c494a067ad4732c0e15ae794f3553 /doc
parent0888d9c9d52c7021ac39f712b0111fe43dce81b0 (diff)
Update ujit.md
Diffstat (limited to 'doc')
-rw-r--r--doc/ujit.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/ujit.md b/doc/ujit.md
index 554b433fa4..6e6b189e9d 100644
--- a/doc/ujit.md
+++ b/doc/ujit.md
@@ -1,7 +1,7 @@
MicroJIT (uJIT)
===============
-**DISCLAIMER: Please note that this project is in early stages of development. It is very much a work in progress, it may cause your software to crash, and current performance results are likely to leave you feeling unimpressed.**
+**DISCLAIMER: Please note that this project is in early stages of development. It is very much a work in progress, it may cause your software to crash, and current performance results are likely to leave you feeling underwhelmed.**
MicroJIT is a lightweight, minimalistic Ruby JIT built inside the CRuby/MRI binary.
It lazily compiles code using a Basic Block Versioning (BBV) architecture. The target use case is that of servers running
@@ -49,15 +49,17 @@ by using the `chruby` tool:
```
chruby ruby-microjit
-ruby <options>
+ruby myscript.rb
```
You can dump statistics about compilation and execution by running uJIT with the `--ujit-stats` command-line option:
```
-./miniruby --ujit-stats <options>
+./miniruby --ujit-stats myscript.rb
```
+The machine code generated for a given method can be printed by adding `puts UJIT.disasm(method(:method_name))` to a Ruby script. Note that no code will be generated if the method is not compiled.
+
## Source Code Organization
The uJIT source code is divided between: