summaryrefslogtreecommitdiff
path: root/mjit.c
AgeCommit message (Collapse)Author
2022-12-08Use a ruby-lang alias [ci skip]Takashi Kokubun
2022-12-08MJIT: Remove obsoleted conditional variablesTakashi Kokubun
2022-12-08MJIT: Mark MJIT's objects from mjit_markTakashi Kokubun
It looks like the current way of marking objects was breaking eightbitraptor's upcoming VWA changes and this seems to fix it.
2022-12-07MJIT: Deal with a TODO with assertionTakashi Kokubun
2022-12-06MJIT: Fix an assertion broken with --mjit-wait enabledTakashi Kokubun
2022-12-06MJIT: Refactor mjit_waitTakashi Kokubun
2022-12-06MJIT: Remove obsoleted MJIT countersTakashi Kokubun
2022-12-06MJIT: Use xfree for unitsTakashi Kokubun
now that we use ZALLOC_N for allocating units
2022-12-06MJIT: Explain why we have MJIT_CFLAGS_PIPE [ci skip]Takashi Kokubun
2022-12-06MJIT: Just use ZALLOC_N in create_unitTakashi Kokubun
We no longer use an MJIT worker thread, so there's no need to avoid GC.
2022-12-06MJIT: Remove an unused argument and unused countersTakashi Kokubun
I plan to rebuild MJIT metrics later, not using debug counters.
2022-12-06MJIT: Refactor the jit_func enum for MJITTakashi Kokubun
All values should have a MJIT_ prefix. We could address the warning for the end mark if we just define the macro for the check next to the enum. It even simplifies some code for checking the enum.
2022-11-29MJIT: Merge mjit_unit.h into mjit_c.hTakashi Kokubun
The distinction doesn't make much difference today.
2022-11-29MJIT: Rename mjit_compiler.c to mjit_c.cTakashi Kokubun
It's no longer about the compiler logic itself.
2022-11-28MJIT: Cache an ISeq pointer instanceTakashi Kokubun
to obviate one rb_funcall. This also removes rb_ptr as refactoring.
2022-11-28MJIT: Make it parsable by Solargraph (#6827)Takashi Kokubun
* Revert "Revert "MJIT: Make it parsable by Solargraph"" This reverts commit 8e18761da1932df88bfb6505acbda4740e1b2930. * Call rb_gc_register_mark_object Notes: Merged-By: k0kubun <[email protected]>
2022-11-28Revert "MJIT: Make it parsable by Solargraph"Takashi Kokubun
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.
2022-11-27MJIT: Make it parsable by SolargraphTakashi Kokubun
2022-11-27MJIT: Avoid hanging on mjit_wait with a JIT failureTakashi Kokubun
2022-11-27Synchronously run the MJIT compiler in the parentTakashi Kokubun
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.
2022-11-25MJIT: Change default --mjit-max-cache back to 100Takashi Kokubun
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
2022-11-25Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada
2022-11-14Rename --mjit-min-calls to --mjit-call-threshold (#6731)Takashi Kokubun
for consistency with YJIT Notes: Merged-By: k0kubun <[email protected]>
2022-11-13s/mjit_func_t/jit_func_t/Takashi Kokubun
2022-10-18Allow passing a Rust closure to rb_iseq_callback (#6575)Takashi Kokubun
Notes: Merged-By: k0kubun <[email protected]>
2022-10-17Make mjit_cont sharable with YJIT (#6556)Takashi Kokubun
* Make mjit_cont sharable with YJIT * Update dependencies * Update YJIT binding Notes: Merged-By: k0kubun <[email protected]>
2022-09-26Rework vm_core to use `int first_lineno` struct member.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/6430
2022-09-07Fix typoTakashi Kokubun
I meant the other one. Otherwise this option doesn't make sense.
2022-09-06Adjust pch_status for --mjit=pauseTakashi Kokubun
to let mjit_add_iseq_to_process work
2022-09-06Skip early mjit_add_iseq_to_process on --mjit=pauseTakashi Kokubun
2022-09-06Skip calling check_unit_queue with mjit_opts.customTakashi Kokubun
fixing the behavior of b726c06e7eeafff52e368179dbe79a11b1aff975
2022-09-06Allow hooking a different method after --mjit=pauseTakashi Kokubun
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.
2022-09-06Cache RubyVM::MJIT constantsTakashi Kokubun
for performance
2022-09-06Add an option to lazily boot MJIT for experimentsTakashi Kokubun
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.
2022-09-06Do not fork the process on --mjit-waitTakashi Kokubun
fork is for parallel compilation, but --mjit-wait cancels it. It's more useful to not fork it for binding.irb, debugging, etc.
2022-09-05Deal with MJIT_FORCE_ENABLE minirubyTakashi Kokubun
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/4225469
2022-09-04Ruby MJIT (#6028)Takashi Kokubun
Notes: Merged-By: k0kubun <[email protected]>
2022-09-04Call appropriate hooks on MJIT's forkTakashi Kokubun
This takes care of signal_self_pipe and other things.
2022-09-03Prefer stdbool for MJIT optionsTakashi Kokubun
same motivation as d6f21b308bcff03e82f8b3dbf11a852ce111b3b3
2022-08-21Use `rb_fork` to suppress deprecated-declarations warningsNobuyoshi Nakada
2022-08-20Drop mswin support of MJIT (#6265)Takashi Kokubun
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] Notes: Merged-By: k0kubun <[email protected]>
2022-08-20Execute MJIT in a forked Ruby process (#6264)Takashi Kokubun
[Misc #18968] Notes: Merged-By: k0kubun <[email protected]>
2022-08-04Add `-bundle_loader` to mjit compilation args on macOSYuta Saito
Notes: Merged: https://github.com/ruby/ruby/pull/6193
2022-07-27Adjust styles [ci skip]Nobuyoshi Nakada
2022-07-14MJIT: Share rb_mjit_unit through mjit_unit.hTakashi Kokubun
mjit_compile.c should be able to access this more easily. Notes: Merged: https://github.com/ruby/ruby/pull/6140
2022-07-14MJIT: Merge mjit_worker.c back to mjit.c (#6138)Takashi Kokubun
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. Notes: Merged-By: k0kubun <[email protected]>
2022-07-11MJIT: s/assert/VM_ASSERT/Takashi Kokubun
include/ruby/assert.h sets NDEBUG by default. As MJIT CI uses -DVM_CHECK_MODE, using only VM_ASSERT might be more helpful.
2022-06-16MJIT: Consider compaction on CC failureTakashi Kokubun
2022-06-15MJIT: Handle compaction units on stop_workerTakashi Kokubun
2022-06-15MJIT: Get rid of obsoleted compiling_iseqsTakashi Kokubun