summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-20cYjitCodeComment is only defined if we're not in debugging modeAaron Patterson
This commit fixes a build error. If we build in release mode (IOW *without* RUBY_DEBUG), then this constant isn't defined. Release mode builds are required by yjit-bench
2021-10-20Pass self type through method callsMaxime Chevalier-Boisvert
2021-10-20Delete codeql-analysis-2.ymlMaxime Chevalier-Boisvert
2021-10-20Create codeql-analysis-2.ymlMaxime Chevalier-Boisvert
2021-10-20Rename YJIT readme to README.mdMaxime Chevalier-Boisvert
2021-10-20Rename Ruby README to README_ruby.mdMaxime Chevalier-Boisvert
2021-10-20Malloc branch entries (#112)Maxime Chevalier-Boisvert
* Malloc branch entries * Add ASM comment for stack overflow check * WIP * Fix branch GC code. Add rb_darray_remove_unordered(). * Fix block end_pos after branch rewriting. Remove dst_patched bits.
2021-10-20Merge pull request #114 from Shopify/yjit-dup-commentsMaxime Chevalier-Boisvert
YJIT: Avoid adding duplicate code comments
2021-10-20Switch to 2-comparison heap object checkMaxime Chevalier-Boisvert
2021-10-20Improve codegen and type tracking in putobjectMaxime Chevalier-Boisvert
2021-10-20Remove debug printsMaxime Chevalier-Boisvert
2021-10-20Fix local type tracking in getlocal, setlocal. Add test.Maxime Chevalier-Boisvert
2021-10-20WIPMaxime Chevalier-Boisvert
2021-10-20add a couple of getivar tests for symbolsAlan Wu
2021-10-20Use a insn_opnd instead of a boolAlan Wu
2021-10-20Temporarily increase MAX_BRANCHES until we have a better solutionMaxime Chevalier-Boisvert
2021-10-20Diff the local types in ctx_diff()Maxime Chevalier-Boisvert
2021-10-20move assert. opnd.idx doesn't make sense for OPND_SELFAlan Wu
2021-10-20YJIT: implement calls to ivar getter methodsAlan Wu
2021-10-20Fix bug in ctx_set_local_type()Maxime Chevalier-Boisvert
2021-10-20Re-enable local type tracking, until first callMaxime Chevalier-Boisvert
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