summaryrefslogtreecommitdiff
path: root/tool
AgeCommit message (Collapse)Author
2018-09-25Revert r64824 to fix build failure on AppVeyork0kubun
AppVeyor msys2/MinGW build started to fail like: https://ci.appveyor.com/project/ruby/ruby/build/9722/job/b94kixi004klmye3 Until I can investigate that, I revert this for now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-24insns.def: optimize & and | of Integer [experimental]k0kubun
not optimizing Array#& and Array#| because vm_insnhelper.c can't easily inline it (large amount of array.c code would be needed in vm_insnhelper.c) and the method body is a little complicated compared to Integer's ones. So I thought only Integer#& and Integer#| have a significant impact, and eliminating unnecessary branches would contribute to JIT's performance. vm_insnhelper.c: ditto tool/transform_mjit_header.rb: make sure these instructions are inlined on JIT. compile.c: compile vm_opt_and and vm_opt_or. id.def: define id for them to be used in compile.c and vm*.c vm.c: track redefinition of Integer#& and Integer#| vm_core.h: allow detecting redefinition of & and | test/ruby/test_jit.rb: test new insns test/ruby/test_optimization.rb: ditto * Optcarrot benchmark This is a kind of experimental thing but I'm committing this since the performance impact is significant especially on Optcarrot with JIT. $ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24 before: ruby 2.6.0dev (2018-09-24 trunk 64821) [x86_64-linux] before+JIT: ruby 2.6.0dev (2018-09-24 trunk 64821) +JIT [x86_64-linux] after: ruby 2.6.0dev (2018-09-24 opt_and 64821) [x86_64-linux] last_commit=opt_or after+JIT: ruby 2.6.0dev (2018-09-24 opt_and 64821) +JIT [x86_64-linux] last_commit=opt_or Calculating ------------------------------------- before before+JIT after after+JIT Optcarrot Lan_Master.nes 51.460 66.315 53.023 71.173 fps Comparison: Optcarrot Lan_Master.nes after+JIT: 71.2 fps before+JIT: 66.3 fps - 1.07x slower after: 53.0 fps - 1.34x slower before: 51.5 fps - 1.38x slower [close https://github.com/ruby/ruby/pull/1963] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-24_mjit_compile_send.erb: remove TODO comment solved [ci skip]k0kubun
which was solved by r64820 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-24_mjit_compile_send.erb: refactor code to setup iseqk0kubun
by sharing vm_call_iseq_setup_normal. This is a retry of r64280. vm_insnhelper.c: Remove unused argument `ci` and pass `me` instead of `cc` to share this with JIT. Declare this with ALWAYS_INLINE to make sure this function is inlined in JIT. tool/mk_call_iseq_optimized.rb: deal with the interface change of vm_call_iseq_setup_normal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-22tool/enc-unicode.rb: rewrote without flip-flopnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21darwin-cc: hide ld warningsnobu
* tool/darwin-cc: ld in Apple's recent Xcode warns text-based stub files, which are probably caused by Apple's broken package. hide such (and architecture deprecation) warnings during configuration to pass TRY_LDFLAGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20fix typo [ci skip]shyouhei
This error does not happen right now so this typo is not serious, unless you locally edit insns.def. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18vm_insnhelper.h: rename CI_SET_FASTPATH to CC_SET_FASTPATHk0kubun
because it's actually setting fastpath to cc instead of ci since r51903. vm_insnhelper.c: ditto mjit_compile.c: ditto tool/ruby_vm/views/_mjit_compile_send.erb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-17common.mk: ruby tool/update-deps --fixk0kubun
tool/update-deps: tweak the comment to make sure it should be built in the source directory, because building ruby outside source directory failed on my trial. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14move ADD_PC around (take 2)shyouhei
Now that we can say for sure if an instruction calls a method or not internally, it is now possible to reroute the bugs that forced us to revert the "move PC around" optimization. First try: r62051 Reverted: r63763 See also: r63999 ---- trunk: ruby 2.6.0dev (2018-09-13 trunk 64736) [x86_64-darwin15] ours: ruby 2.6.0dev (2018-09-13 trunk 64736) [x86_64-darwin15] last_commit=move ADD_PC around (take 2) Calculating ------------------------------------- trunk ours so_ackermann 1.884 2.278 i/s - 1.000 times in 0.530926s 0.438935s so_array 1.178 1.157 i/s - 1.000 times in 0.848786s 0.864467s so_binary_trees 0.176 0.177 i/s - 1.000 times in 5.683895s 5.657707s so_concatenate 0.220 0.221 i/s - 1.000 times in 4.546896s 4.518949s so_count_words 6.729 6.470 i/s - 1.000 times in 0.148602s 0.154561s so_exception 3.324 3.688 i/s - 1.000 times in 0.300872s 0.271147s so_fannkuch 0.546 0.968 i/s - 1.000 times in 1.831328s 1.033376s so_fasta 0.541 0.547 i/s - 1.000 times in 1.849923s 1.827091s so_k_nucleotide 0.800 0.777 i/s - 1.000 times in 1.250635s 1.286295s so_lists 2.101 1.848 i/s - 1.000 times in 0.475954s 0.541095s so_mandelbrot 0.435 0.408 i/s - 1.000 times in 2.299328s 2.450535s so_matrix 1.946 1.912 i/s - 1.000 times in 0.513872s 0.523076s so_meteor_contest 0.311 0.317 i/s - 1.000 times in 3.219297s 3.152052s so_nbody 0.746 0.703 i/s - 1.000 times in 1.339815s 1.423441s so_nested_loop 0.899 0.901 i/s - 1.000 times in 1.111767s 1.109555s so_nsieve 0.559 0.579 i/s - 1.000 times in 1.787763s 1.726552s so_nsieve_bits 0.435 0.428 i/s - 1.000 times in 2.296282s 2.333852s so_object 1.368 1.442 i/s - 1.000 times in 0.731237s 0.693684s so_partial_sums 0.616 0.546 i/s - 1.000 times in 1.623592s 1.833097s so_pidigits 0.831 0.832 i/s - 1.000 times in 1.203117s 1.202334s so_random 2.934 2.724 i/s - 1.000 times in 0.340791s 0.367150s so_reverse_complement 0.583 0.866 i/s - 1.000 times in 1.714144s 1.154615s so_sieve 1.829 2.081 i/s - 1.000 times in 0.546607s 0.480562s so_spectralnorm 0.524 0.558 i/s - 1.000 times in 1.908716s 1.792382s git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13Revert "vm_insnhelper.h: simplify EXEC_EC_CFP implementation"k0kubun
This reverts commit r64711, because EXEC_EC_CFP on JIT-ed code does not call jit_func with the patch when catch_except_p is true. It wasn't intentional. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13vm_insnhelper.h: simplify EXEC_EC_CFP implementationk0kubun
and possibly memory access for iseq->body may be reduced. No significant impact for performance on Optcarrot. * before fps: 55.03865935187656 fps: 57.16854675983188 fps: 57.672458407661765 fps: 58.28989837869383 fps: 58.80503815099268 fps: 59.068054176528534 fps: 59.55736806358244 fps: 61.01018920533034 fps: 63.34167049232186 fps: 65.20575018321766 fps: 65.46758316561318 * after fps: 55.21860411005677 fps: 55.34840351179166 fps: 58.23666596747484 fps: 59.71987124578901 fps: 61.131485120234935 fps: 61.279905164649485 fps: 61.66060774175459 fps: 64.11215576508765 fps: 64.63699742853154 fps: 65.28260058920769 fps: 65.85447796482678 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13move canary-related statements into macrosshyouhei
This is mostly cosmetic. Should generate a slightly readable vm.inc output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12_mjit_compile_pc_and_sp.erb: forget about memcpy [ci skip]k0kubun
because using memcpy here actually made performance worse. In Optcarrot, * for loop fps: 55.90428960597268 fps: 57.21690379342434 fps: 58.41751168279789 fps: 58.7317470613203 fps: 62.81371000202459 fps: 63.02541045417479 fps: 63.77324026366317 fps: 65.48067818347447 fps: 66.02324323831398 fps: 66.3816048847424 fps: 66.54526488660156 * memcpy fps: 54.98389812126847 fps: 57.96524857391357 fps: 57.974918725327946 fps: 58.285987089087364 fps: 58.639003211333225 fps: 59.03244214601948 fps: 59.89964772199603 fps: 60.809490242786175 fps: 62.462070790624146 fps: 62.534599002918306 fps: 63.787312566163756 That's probably because the copied size is very small. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11_mjit_compile_insn.erb: move pc on JIT cancelk0kubun
if and only if it's not moved yet, to avoid potential bugs in the future. _mjit_compile_send.erb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11bare_instructions.rb: use Hash#fetch to read attrk0kubun
to raise descriptive KeyError instead of NoMethodError in case these attrs are accidentally removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11_mjit_compile_insn.erb: prefer insn.always_leaf?k0kubun
rather than `trace_enablable_insns` which is hard to maintain. This would make performance bad because new branches for tracepoint will be added. Optcarrot before: fps: 56.885371547337655 fps: 60.02493636060194 fps: 63.051028327122076 fps: 63.78463316242535 fps: 64.20391937940403 fps: 64.55990344731123 fps: 64.56771099162921 fps: 64.95991277629723 fps: 65.15120708973232 fps: 65.90558702393933 fps: 66.29579283026303 Optcarrot after: fps: 52.7647027470875 fps: 53.67404855529564 fps: 58.40514319229468 fps: 60.90736996487708 fps: 62.83487236283472 fps: 63.01386139447994 fps: 63.42395443471596 fps: 63.78328559878602 fps: 64.58432081229746 fps: 64.78720429848532 fps: 65.48720618907552 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11_mjit_compile_pc_and_sp.erb: skip moving pck0kubun
when catch_except_p is false and insn.always_leaf? is true (never makes arbitrary method call in the insn). On Optcarrot, unfortunately this didn't have measureable performance impact. But still this is a good direction since it becomes much faster when marking all insns as always leaf. bare_instructions.rb: add `#always_leaf?` that indicates the insn can always be considered as leaf. Using dynamic leaf for JIT would be hard since it requires to discard outdated code somehow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11transform_mjit_header.rb: add static to Init_*k0kubun
as well, to make CI succeed with VM_CHECK_MODE > 1. vm_insnhelper.c: drop unnecessary MJIT_HEADER ifdef. This is intended to be ignored by having `static inline`. Removing that by macro would be helpful for minimizing compilation time, but the impact is not so big and having many MJIT_HEADER check would be bad for maintainability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11add new instruction attribute called leafshyouhei
An instruction is leaf if it has no rb_funcall inside. In order to check this property, we introduce stack canary which is a random number collected at runtime. Stack top is always filled with this number and checked for stack smashing operations, when VM_CHECK_MODE. [GH-1947] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-07tool/node_name.rb: rewrote without flip-flopnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-04use mingw ANSI stdionobu
[Bug #13496] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-03Declare as gnu_printf on mingwnobu
[Bug #13496] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28Fixed installation failure with mswin environment.hsbt
[ruby-core:88699][Bug #15035] This patch was provided by MSP-Greg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18tool/downloader.rb: retry 500 from GitHubk0kubun
Unfortunately, GitHub may return 500 for temporary failure: https://travis-ci.org/ruby/ruby/builds/417246523 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13get rid of an encode noncompatible errorusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-12tool/downloader.rb: increase retriesk0kubun
GitHub download failed on 13:50:36 https://ci.appveyor.com/project/ruby/ruby/build/1.0.9221 and it also failed on 13:51:35 (all builds between them failed too). It means that we need to expect GitHub 502 that continues 1 minute. So I configured 6 retries, that will sleep at most 91s in total. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-12vm_insnhelper.c: revert r64280k0kubun
This commit caused test-all failure with --jit-wait. I don't know the reason yet, but let me revert it to normalize CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11_mjit_compile_pc_and_sp.erb: update the commentk0kubun
about the pc motion reason git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11_mjit_compile_pc_and_sp.erb: always move pck0kubun
to fix the wrong line number on #caller_locations or rb_profile_frames. Actually we would be able to move it only when method call (of caller_locations) or C extension invocation (calling rb_profile_frames) can happen. This degrades performance. Optcarrot fps becomes... before: 71.78976052783555 after: 67.65429356624131 I think I can lazily move it and fix the performance issue, even improving the performance for the situation catch table exists. But let me fix this bug first... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11tool/downloader.rb: retry on 502 and 503 errork0kubun
rubyci was failed by download 503 https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180811T021706Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11vm_args.c: stop requiring `calling` in vm_caller_setup_arg_blockk0kubun
_mjit_compile_send.erb: simplify code using the change insns.def: adapt to the interface change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11_mjit_compile_send.erb: refactor to share vm_call_iseq_setup_normalk0kubun
implementation. This had no major performance impact by effort to keep them inlined. vm_insnhelper.c: ditto mjit_compile.c: just update the comment about opt_pc=0 assumption git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06Ignore native extension of Date library when syncing gemification files.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31transform_mjit_header.rb: more strict FUNC_HEADER_REGEXPk0kubun
to reduce "SKIPPED" logs on MJIT header build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31Follow up r64141 with sync tool.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31Fixed unexpected direction deletion with irb sync.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31Support Sync module same as other default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31transform_mjit_header.rb: accept having attributek0kubun
between a type of return value and function identifier. Like: ``` rb_control_frame_t * __attribute__ ((__fastcall__)) rb_vm_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) { ... } ``` [Bug #14949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-28make-snapshot: fetch from the official git sitenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-28use https:// instead of http://kazu
[ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-28use https:// instead of git:// when possiblenormal
Avoid MitM when downloading from insecure networks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25insns.def: s/handles_frame/handles_sp/k0kubun
because it's more suitable to describe the current behavior now. tool/ruby_vm/models/bare_instructions.rb: ditto. tool/ruby_vm/views/_insn_entry.erb: ditto. tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto. tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Promote Mutex_m to Default gems.hsbt
* lib/mutex_m.gemspec: Added initial gemspec. * lib/mutex_m.rb: Added Mutex_m::VERSION for gemspec. * tool/sync_default_gems.rb: Support Mutex_m. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Promote Exception2MessageMapper to Default gems.hsbt
* lib/e2mmap.gemspec: Added initial gemspec. * lib/e2mmap/version.rb: Added Exception2MessageMapper::VERSION for gemspec. * tool/sync_default_gems.rb: Support Exception2MessageMapper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Promote ThWait to Default gems.hsbt
* lib/thwait.gemspec: Added initial gemspec. * lib/thwait/version.rb: Added ThWait::VERSION for gemspec. * tool/sync_default_gems.rb: Support ThWait. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Removed duplicate task in default gems that used single test filehsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Promote Forwardable to default gems.hsbt
* lib/forwardable.rb: Added Forwardable::VERSION and re-use it. * lib/forwardable/forwardable.gemspec: Added initial gemspec. * tool/sync_default_gems.rb: Support forwaradable repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Removed duplicate task in default gemshsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-25Support logger.gemspechsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e