summaryrefslogtreecommitdiff
path: root/mjit.c
Commit message (Collapse)AuthorAgeFilesLines
* MJIT: Merge mjit_unit.h into mjit_c.hTakashi Kokubun2022-11-291-1/+1
| | | | The distinction doesn't make much difference today.
* MJIT: Rename mjit_compiler.c to mjit_c.cTakashi Kokubun2022-11-291-2/+20
| | | | It's no longer about the compiler logic itself.
* MJIT: Cache an ISeq pointer instanceTakashi Kokubun2022-11-281-1/+5
| | | | to obviate one rb_funcall. This also removes rb_ptr as refactoring.
* MJIT: Make it parsable by Solargraph (#6827)Takashi Kokubun2022-11-281-2/+3
| | | | | | | * Revert "Revert "MJIT: Make it parsable by Solargraph"" This reverts commit 8e18761da1932df88bfb6505acbda4740e1b2930. * Call rb_gc_register_mark_object
* Revert "MJIT: Make it parsable by Solargraph"Takashi Kokubun2022-11-281-2/+2
| | | | | | | | | | | This reverts commit ccd8dd6ad395bbd9f5290e0fcb7929e5e5d36767. Revert "MJIT: Fix miniruby with MJIT_FORCE_ENABLE" This reverts commit b033775ed9d9226ba73c1d4a197e55ba89575142. GitHub Actions is failing. I ran out of time today to investigate it. will try it again tomorrow.
* MJIT: Make it parsable by SolargraphTakashi Kokubun2022-11-271-2/+2
|
* MJIT: Avoid hanging on mjit_wait with a JIT failureTakashi Kokubun2022-11-271-1/+6
|
* Synchronously run the MJIT compiler in the parentTakashi Kokubun2022-11-271-43/+50
| | | | | | | | | | | process. Completely isolating the MJIT compilation process complicates a lot of things for ensuring consistency before and after the fork. Just running this synchronously makes things a lot easier, for example the race condition of capture_cc_entries could be fixed by this patch alone. Hopefully, the bottleneck is the C compiler and not this Ruby code. Also, this change doesn't negatively impact MJIT's final numbers on yjit-bench while "1st itr" is degraded for sure.
* MJIT: Change default --mjit-max-cache back to 100Takashi Kokubun2022-11-251-1/+1
| | | | | | | | | | | | | | | | | These days we benchmark MJIT using yjit-bench. The warmup duration in yjit-bench is very short, so compiling many methods comes at a cost even while it's actually optimal for MJIT to compile everything / tens of thousands of methods once it reaches the peak performance. yjit-bench doesn't necessarily represent the peak performance on production. It measures the performance of Ruby 30~60s after boot. If your JIT takes more than 1 minute to warm up, there's no way for the JIT to make the numbers good on yjit-bench. Until we make MJIT's compilation much faster, we don't afford compiling 10,000 methods on yjit-bench. This change alone makes MJIT's benchmark number on railsbench 2x better :p
* Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada2022-11-251-7/+7
|
* Rename --mjit-min-calls to --mjit-call-threshold (#6731)Takashi Kokubun2022-11-141-13/+13
| | | for consistency with YJIT
* s/mjit_func_t/jit_func_t/Takashi Kokubun2022-11-131-9/+9
|
* Allow passing a Rust closure to rb_iseq_callback (#6575)Takashi Kokubun2022-10-181-2/+2
|
* Make mjit_cont sharable with YJIT (#6556)Takashi Kokubun2022-10-171-99/+4
| | | | | | | * Make mjit_cont sharable with YJIT * Update dependencies * Update YJIT binding
* Rework vm_core to use `int first_lineno` struct member.Samuel Williams2022-09-261-16/+10
|
* Fix typoTakashi Kokubun2022-09-071-1/+1
| | | | I meant the other one. Otherwise this option doesn't make sense.
* Adjust pch_status for --mjit=pauseTakashi Kokubun2022-09-061-1/+2
| | | | to let mjit_add_iseq_to_process work
* Skip early mjit_add_iseq_to_process on --mjit=pauseTakashi Kokubun2022-09-061-1/+1
|
* Skip calling check_unit_queue with mjit_opts.customTakashi Kokubun2022-09-061-0/+1
| | | | fixing the behavior of b726c06e7eeafff52e368179dbe79a11b1aff975
* Allow hooking a different method after --mjit=pauseTakashi Kokubun2022-09-061-9/+36
| | | | | The interface is similar to RubyVM::ISeq.translate; it's used if defined. Same as --mjit=pause, this is an undocumented feature for MJIT experiments.
* Cache RubyVM::MJIT constantsTakashi Kokubun2022-09-061-0/+7
| | | | for performance
* Add an option to lazily boot MJIT for experimentsTakashi Kokubun2022-09-061-5/+18
| | | | | | You may use `RUBYOPT=--mjit=pause irb` to play with RubyVM::MJIT::C, control the boot timing of MJIT, or customize the implementation while paused. It's an undocumented feature for such experiments.
* Do not fork the process on --mjit-waitTakashi Kokubun2022-09-061-20/+22
| | | | | fork is for parallel compilation, but --mjit-wait cancels it. It's more useful to not fork it for binding.irb, debugging, etc.
* Deal with MJIT_FORCE_ENABLE minirubyTakashi Kokubun2022-09-051-0/+9
| | | | http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/4225469
* Ruby MJIT (#6028)Takashi Kokubun2022-09-041-6/+6
|
* Call appropriate hooks on MJIT's forkTakashi Kokubun2022-09-041-18/+4
| | | | This takes care of signal_self_pipe and other things.
* Prefer stdbool for MJIT optionsTakashi Kokubun2022-09-031-4/+4
| | | | same motivation as d6f21b308bcff03e82f8b3dbf11a852ce111b3b3
* Use `rb_fork` to suppress deprecated-declarations warningsNobuyoshi Nakada2022-08-211-2/+3
|
* Drop mswin support of MJIT (#6265)Takashi Kokubun2022-08-201-326/+8
| | | | | | | The current MJIT relies on SIGCHLD and fork(2) to be performant, and it's something mswin can't offer. You could run Linux MJIT on WSL instead. [Misc #18968]
* Execute MJIT in a forked Ruby process (#6264)Takashi Kokubun2022-08-201-23/+62
| | | [Misc #18968]
* Add `-bundle_loader` to mjit compilation args on macOSYuta Saito2022-08-041-2/+10
|
* Adjust styles [ci skip]Nobuyoshi Nakada2022-07-271-1/+2
|
* MJIT: Share rb_mjit_unit through mjit_unit.hTakashi Kokubun2022-07-141-30/+1
| | | | mjit_compile.c should be able to access this more easily.
* MJIT: Merge mjit_worker.c back to mjit.c (#6138)Takashi Kokubun2022-07-141-5/+1264
| | | | | Since #6006, we no longer avoid executing GC on mjit_worker.c and thus there's no need to carefully change how we write code whether you're in mjit.c or mjit_worker.c anymore.
* MJIT: s/assert/VM_ASSERT/Takashi Kokubun2022-07-111-2/+2
| | | | | | include/ruby/assert.h sets NDEBUG by default. As MJIT CI uses -DVM_CHECK_MODE, using only VM_ASSERT might be more helpful.
* MJIT: Consider compaction on CC failureTakashi Kokubun2022-06-161-1/+3
|
* MJIT: Handle compaction units on stop_workerTakashi Kokubun2022-06-151-6/+13
|
* MJIT: Get rid of obsoleted compiling_iseqsTakashi Kokubun2022-06-151-33/+3
|
* MJIT: Deal with mjit_free_iseq on mjit_notify_waitpidTakashi Kokubun2022-06-151-7/+9
|
* MJIT: Fix test_jit_failure for mswinTakashi Kokubun2022-06-151-1/+1
|
* MJIT: Handle C compiler failuresTakashi Kokubun2022-06-151-4/+5
|
* MJIT: Handle JIT failure properlyTakashi Kokubun2022-06-151-1/+9
|
* Remove unused rb_thread_create_mjit_threadTakashi Kokubun2022-06-151-2/+0
| | | | follow up https://github.com/ruby/ruby/pull/6006
* Move RubyVM::MJIT to builtin RubyTakashi Kokubun2022-06-151-3/+7
| | | | just less C code to maintain
* Remove MJIT worker thread (#6006)Takashi Kokubun2022-06-151-132/+184
| | | [Misc #18830]
* Drop MinGW support of MJIT (#6012)Takashi Kokubun2022-06-131-18/+0
| | | [Feature #18824]
* Prefix ccan headers (#4568)Nobuyoshi Nakada2022-03-301-7/+7
| | | | | | | | | | | | | * Prefixed ccan headers * Remove unprefixed names in ccan/build_assert * Remove unprefixed names in ccan/check_type * Remove unprefixed names in ccan/container_of * Remove unprefixed names in ccan/list Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
* Add ISEQ_BODY macroPeter Zhu2022-03-241-31/+31
| | | | | | Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using this macro will make it easier for us to change the allocation strategy of rb_iseq_constant_body when using Variable Width Allocation.
* Transfer the responsibility for MJIT options to mjit.cNobuyoshi Nakada2022-01-151-0/+58
|
* Revert "Pause an MJIT worker when JIT is cancelled"Takashi Kokubun2021-08-131-3/+0
| | | | | | This reverts commit b64f81c81729bbc248d19af01cafde88eb60fdc7. It seems to cause a problem in --jit / --jit-wait CIs. Reverting for now.