Takashi Kokubun
7dcdffebc8
Invalidate blocks on global constant changes
2023-03-05 23:28:59 -08:00
Takashi Kokubun
32e6f15beb
Store MJIT blocks on each ISEQ
2023-03-05 23:28:59 -08:00
Takashi Kokubun
63d96ccbcd
Invalidate everything on GC.compact
2023-03-05 23:28:59 -08:00
Takashi Kokubun
feb60f6f51
Invalidate blocks on constant IC updates
2023-03-05 23:28:59 -08:00
Takashi Kokubun
9e42f31574
Do not compile C calls when C tracing is enabled
2023-03-05 22:41:35 -08:00
Takashi Kokubun
b30392f8ab
Disable TracePoint during MJIT compilation
2023-03-05 22:41:35 -08:00
Takashi Kokubun
1892ec5738
Lazily invalidate cme for safety
2023-03-05 22:41:35 -08:00
Takashi Kokubun
1bdc23f35b
Redo compilation of all ISEQs after invalidation
2023-03-05 22:41:35 -08:00
Takashi Kokubun
aba530e23b
Implement invalidation after cfunc
2023-03-05 22:41:35 -08:00
Takashi Kokubun
a026bcedc8
Allow reusing existing blocks
2023-03-05 22:11:20 -08:00
Takashi Kokubun
d415f1e317
Get rid of BlockStub
2023-03-05 22:11:20 -08:00
Takashi Kokubun
6c1b1fa1f5
Refactor BranchStub
2023-03-05 22:11:20 -08:00
Takashi Kokubun
4bb4479165
Add compiled_block_count
2023-03-05 22:11:20 -08:00
Takashi Kokubun
e731ced271
Implement method call
2023-03-05 22:11:20 -08:00
Takashi Kokubun
62d36dd127
Implement branch stub
2023-03-05 22:11:20 -08:00
Takashi Kokubun
eddec7bc20
Support release build
2023-03-05 22:11:20 -08:00
Takashi Kokubun
1f69ba1d84
Use the actual sp_offset
2023-03-05 22:11:20 -08:00
Takashi Kokubun
c3d99d0f12
Implement defer_compilation
2023-03-05 22:11:20 -08:00
Takashi Kokubun
7abff797b4
Use the term "compile" in different places
2023-03-05 22:11:20 -08:00
Takashi Kokubun
c51baf9404
Carve out CodeBlock
2023-03-05 22:11:20 -08:00
Takashi Kokubun
5760f7fd3c
Skip compiling at_exit without --mjit-stats
2023-03-05 22:11:20 -08:00
Takashi Kokubun
e4a824f769
Fix broken rebase
2023-03-05 22:11:20 -08:00
Takashi Kokubun
9f8f1afba2
Implement --mjit-stats
2023-03-05 22:11:20 -08:00
Takashi Kokubun
652d63789f
Fix TracePoint tests
2023-03-05 22:11:20 -08:00
Takashi Kokubun
114f8d3e33
Disable MJIT on a couple of conditions
2023-03-05 22:11:20 -08:00
Takashi Kokubun
43f579afb4
Fix a critical mistake around GC
2023-03-05 22:11:20 -08:00
Takashi Kokubun
783f730773
Lock VM during compilation
2023-03-05 22:11:20 -08:00
Takashi Kokubun
2700d35b7b
Split responsibilities differently
2023-03-05 22:11:20 -08:00
Takashi Kokubun
3fa4d41460
Implement --mjit-dump-disasm
2023-03-05 22:11:20 -08:00
Takashi Kokubun
fd04e1b4db
Implement a no-op JIT compiler
2023-03-05 22:11:20 -08:00
Takashi Kokubun
baa120ee80
Prepare a JIT buffer
2023-03-05 22:11:20 -08:00
Takashi Kokubun
9c2f612017
Prepare for compiling an ISEQ
2023-03-05 22:11:20 -08:00
Takashi Kokubun
3d19db4f8b
Use call-threshold 1 for now
2023-03-05 22:11:20 -08:00
Takashi Kokubun
251f976235
Prepare rb_mjit_compile hook
2023-03-05 22:11:20 -08:00
Takashi Kokubun
3c093fe391
Move important functions
2023-03-05 22:11:20 -08:00
Takashi Kokubun
c263ce9c80
Remove more code
2023-03-05 22:11:20 -08:00
Takashi Kokubun
5d819b9a15
Clean up the current MJIT implementation
2023-03-05 22:11:20 -08:00
Matt Valentine-House
72aba64fff
Merge gc.h and internal/gc.h
...
[Feature #19425 ]
2023-02-09 10:32:29 -05:00
Takashi Kokubun
b9332ac8e7
MJIT: Cancel all on disastrous situations ( #7019 )
...
I noticed this while running test_yjit with --mjit-call-threshold=1,
which redefines `Integer#<`. When Ruby is monkey-patched,
MJIT itself could be broken.
Similarly, Ruby scripts could break MJIT in many different ways. I
prepared the same set of hooks as YJIT so that we could possibly
override it and disable it on those moments. Every constant under
RubyVM::MJIT is private and thus it's an unsupported behavior though.
2022-12-24 01:13:40 -08:00
Takashi Kokubun
9d59d093bd
MJIT: Compile methods in batches ( #6900 )
...
* MJIT: Compile methods in batches
* MJIT: make mjit-bindgen
* MJIT: Fix RubyVM::MJIT tests
2022-12-10 22:21:06 -08:00
Takashi Kokubun
8893913ae6
MJIT: Clarify jit_unit is only for MJIT
2022-12-08 23:43:09 -08:00
Takashi Kokubun
260a00d80e
MJIT: Refactor JIT failure handling
2022-12-08 23:08:34 -08:00
Takashi Kokubun
4885aa9a7c
MJIT: Add comments about custom hooks [ci skip]
2022-12-08 23:06:27 -08:00
Takashi Kokubun
0dc5c117a5
MJIT: Convert compact_p flag to an enum
...
I'm gonna add another type of unit shortly.
2022-12-08 22:53:58 -08:00
Takashi Kokubun
bfc225764e
MJIT: Drop an obsoleted explanation [ci skip]
...
There's no MJIT worker thread anymore
2022-12-08 22:40:56 -08:00
Takashi Kokubun
33aa06e3e6
Use a ruby-lang alias [ci skip]
2022-12-08 22:40:56 -08:00
Takashi Kokubun
ec184077bc
MJIT: Remove obsoleted conditional variables
2022-12-08 21:42:15 -08:00
Takashi Kokubun
2cea8e014d
MJIT: Mark MJIT's objects from mjit_mark
...
It looks like the current way of marking objects was breaking
eightbitraptor's upcoming VWA changes and this seems to fix it.
2022-12-08 10:31:56 -08:00
Takashi Kokubun
09bc3abd2e
MJIT: Deal with a TODO with assertion
2022-12-07 21:20:05 -08:00
Takashi Kokubun
65545c6608
MJIT: Fix an assertion broken with --mjit-wait enabled
2022-12-06 23:46:16 -08:00