Takashi Kokubun
2702d615f5
Remove obsoleted mjit_config.h
2023-03-06 22:31:43 -08:00
Takashi Kokubun
22d944c8b7
Avoid crashing at a random ISEQ access
...
[Feature #19420 ]
2023-03-05 23:28:59 -08:00
Takashi Kokubun
d6fde0e6db
Change default call threshold to 30
2023-03-05 23:28:59 -08:00
Takashi Kokubun
1c267d0723
Workaround USE_MJIT warnings
2023-03-05 23:28:59 -08:00
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