summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-20Update yjit_codegen.cMaxime Chevalier-Boisvert
2021-10-20Assert for running out of branches in all buildsAlan Wu
2021-10-20Factor our guard_two_fixnums(). Implement opt_or.Maxime Chevalier-Boisvert
2021-10-20Remove unnamed enums because MSVC suxMaxime Chevalier-Boisvert
2021-10-20Introduce concept of YJIT instruction operandsMaxime Chevalier-Boisvert
2021-10-20Use autogen.sh in YJIT's CI setupAlan Wu
See d825e34962540d345eb3c5a70eb264b415e915a5
2021-10-20YJIT: Fancier opt_getinlinecacheAlan Wu
Make sure `opt_getinlinecache` is in a block all on its own, and invalidate it from the interpreter when `opt_setinlinecache`. It will recompile with a filled cache the second time around. This lets YJIT runs well when the IC for constant is cold.
2021-10-20Fix stack-use-after-scope in gen_direct_jump()Alan Wu
ASAN can catch these type of things for us, but the scraper can't handle ASAN :/. To be more resilient to refactoring, extend the lifetime of `generic_ctx` in branch_stub_hit() too.
2021-10-20Compute percentage of exits for top-10 exit opsMaxime Chevalier-Boisvert
2021-10-20Fix two stats bugs, refactor stats code, add total_insn_count printMaxime Chevalier-Boisvert
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20YJIT: add comments to disassemblyAlan Wu
Introduce a new macro `ADD_COMMENT(cb, comment)` that records a comment for the current write position in the code block. Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> Co-authored-by: Aaron Patterson <aaron.patterson@shopify.com>
2021-10-20Update yjit_iface.cMaxime Chevalier-Boisvert
2021-10-20YJIT: make ratio_in_yjit more accurateAlan Wu
Don't count instructions that take exit to the interpreter.
2021-10-20Add flag bits to avoid compiling stubs multiple times.Maxime Chevalier-Boisvert
Fixes bug involving ractors and branch stubs.
2021-10-20Disable local type tracking for nowMaxime Chevalier-Boisvert
2021-10-20Keep track of local types in the contextMaxime Chevalier-Boisvert
2021-10-20Add ctcx_stack_push_local()Maxime Chevalier-Boisvert
2021-10-20update depsAaron Patterson
2021-10-20Fix caseAaron Patterson
2021-10-20Collect statistics about binding allocations / local variable setAaron Patterson
This commit collects statistics about how many binding objects are allocated as well as the number of local variables set on bindings. Statistics are output along with other YJIT stats. Here is an example of the output: ``` ***YJIT: Printing runtime counters from yjit.rb*** Number of Bindings Allocated: 195 Number of locals modified through binding: 0 opt_send_without_block exit reasons: ivar_get_method 7515891 (40.4%) se_cc_klass_differ 3081330 (16.6%) iseq_argc_mismatch 1564578 ( 8.4%) se_receiver_not_heap 1557663 ( 8.4%) ic_empty 1407064 ( 7.6%) optimized_method 995823 ( 5.4%) iseq_not_simple 819413 ( 4.4%) alias_method 706972 ( 3.8%) bmethod 685253 ( 3.7%) callsite_not_simple 225983 ( 1.2%) kw_splat 25999 ( 0.1%) ivar_set_method 902 ( 0.0%) cfunc_toomany_args 394 ( 0.0%) refined_method 42 ( 0.0%) cfunc_ruby_array_varg 29 ( 0.0%) invalid_cme 4 ( 0.0%) leave exit reasons: se_finish_frame 4067107 (100.0%) se_interrupt 24 ( 0.0%) getinstancevariable exit reasons: undef 121177 (100.0%) idx_out_of_range 5 ( 0.0%) opt_aref exit reasons: (all relevant counters are zero) compiled_iseq_count: 3944 main_block_code_size: 1.1 MiB side_block_code_size: 0.6 MiB vm_insns_count: 1137268516 yjit_exec_insns_count: 414015644 ratio_in_yjit: 26.7% avg_len_in_yjit: 7.5 total_exit_count: 55491789 most frequent exit op: opt_send_without_block: 18587628 (33.5%) opt_getinlinecache: 11075822 (20.0%) send: 4949300 (8.9%) leave: 4067131 (7.3%) defined: 3975196 (7.2%) setinstancevariable: 3567315 (6.4%) invokesuper: 2982163 (5.4%) getblockparamproxy: 2168852 (3.9%) opt_nil_p: 2104524 (3.8%) opt_aref: 2013858 (3.6%) ``` Running RailsBench allocates 195 binding objects but doesn't set any local variables.
2021-10-20Add comments and asserts for clarityMaxime Chevalier-Boisvert
2021-10-20Update yjit_asm.cMaxime Chevalier-Boisvert
2021-10-20Fill uninitialized memory with int3Maxime Chevalier-Boisvert
2021-10-20Readd const argumentsMaxime Chevalier-Boisvert
2021-10-20Fix branch rewrite issueMaxime Chevalier-Boisvert
2021-10-20Update yjit_core.cMaxime Chevalier-Boisvert
2021-10-20YJIT: adjust branch shape properly when target already existsAlan Wu
The old code decides branch->shape based on the write position of the native code block, which is unsound in case the block already exists and no new code is written to the write position. Make this decision with the start address of the target block instead. Also handle when the branch becomes smaller after patching.
2021-10-20Rename first call => threshold oneMaxime Chevalier-Boisvert
2021-10-20use ctx_stack_push_self()Maxime Chevalier-Boisvert
2021-10-20Fix type_diff logic after Alan pointed out errorsMaxime Chevalier-Boisvert
2021-10-20Part 1 of improved type tracking logicMaxime Chevalier-Boisvert
2021-10-20WIPMaxime Chevalier-Boisvert
2021-10-20Commit WIPMaxime Chevalier-Boisvert
2021-10-20First sketch at temp type mappingMaxime Chevalier-Boisvert
2021-10-20Log code size in bytes instead of MiBMaxime Chevalier-Boisvert
2021-10-20Fix improper use of st_foreach_with_replaceAlan Wu
Replacing the key was only okay if the new key hashes to the same thing as the old key. That doesn't hold for YJIT's table when the keys move.
2021-10-20Fix GCC warningsAlan Wu
Mostly unused and uninitialized warnings here and there
2021-10-20Stop all other ractors when patching machine codeAlan Wu
2021-10-20Add a CI check for --yjit-call-threshold=1Alan Wu
Mostly copied from mjit.yml. Thank you Kokubun-san!
2021-10-20Add a commentAlan Wu
2021-10-20Fix issue with version matching logicMaxime Chevalier-Boisvert
2021-10-20Track interpreter return as an exit reason for leave instrMaxime Chevalier-Boisvert
2021-10-20Implement opt_gtMaxime Chevalier-Boisvert
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Factor out protected callee guard, check for private calleesAlan Wu
We didn't need the private check before because we were lifting from the interpreter's cache, and the interpreter only caches when visibility checks go through.
2021-10-20Factor out jit_jump_to_next_insnAlan Wu
2021-10-20Introduce yjit_guard_known_klass()Alan Wu
2021-10-20Polymorphic opt_send_without_blockAlan Wu
2021-10-20Get rid of dependency on rb_call_cacheAlan Wu