summaryrefslogtreecommitdiff
path: root/tool
Commit message (Collapse)AuthorAgeFilesLines
* pure_parser.rb: get rid of an error at localed messagesNobuyoshi Nakada2020-05-201-1/+4
|
* Make builtin loader sources by RipperNobuyoshi Nakada2020-05-191-44/+70
|
* Reduce code size for rb_class_ofTakashi Kokubun2020-05-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by inlining only hot path. === mame/optcarrot === $ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark.yml --repeat-count=24 --output=all before --jit: ruby 2.8.0dev (2020-05-18T05:21:31Z master 0e5a58b6bf) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-05-18T06:12:04Z master 0e3d71a8d1) +JIT [x86_64-linux] last_commit=Reduce code size for rb_class_of Calculating ------------------------------------- before --jit after --jit Optcarrot Lan_Master.nes 71.62880463568773 70.95730063273503 fps 71.73973684273152 71.98447841929851 75.03923801841310 75.54262519509039 75.16300287174957 77.64029272984344 75.16834828625935 78.67861469580785 75.17670723726911 78.81879353707393 75.67637908020630 79.18188850392886 76.19843953215396 79.66484891814478 77.28166716118808 79.80278072861037 77.38509903325165 80.05859292679696 78.12693418455953 80.34624804808006 78.73654441746730 80.66326571254345 79.25387513454415 80.69760605740196 79.44137881689524 81.32053489212245 79.50497657368358 81.50250852553751 79.62401328582868 82.27544931834611 79.79178811723664 82.67455264522741 81.20275352937418 82.93857260493297 81.57027048640776 83.15019118788184 81.63373188649095 83.20728816044721 81.93420437766426 83.25027576772972 82.05716136357167 83.27072145898173 82.21070805525066 83.36008265822194 82.56924063784872 83.36112268888493 === benchmark-driver/sinatra === [rps] before: 13143.49 rps after: 13505.70 rps [inlined rb_class_of size] before: 11.5K after: 3.8K (calculated by `dwarftree --die inlined_subroutine --flat --merge --show-size`)
* Mark some JIT-ed functions as COLDFUNCTakashi Kokubun2020-05-171-0/+16
| | | | | Put some functions which are unlikely to be called on JIT in .text.unlikely section to improve hot code's locality.
* Added --test-order=nosort optionNobuyoshi Nakada2020-05-172-3/+8
| | | | Run tests in the order given in the command line.
* leakchecker.rb: show test nameNobuyoshi Nakada2020-05-161-1/+1
| | | | When multiple autoclose IO objects are leaked too.
* extlibs.rb: fixed Downloader.cache_file call and return valueNobuyoshi Nakada2020-05-141-1/+1
| | | | | `cache_dir` is an optinal argument but not a keyword argument, and the return value is a `Pathname`.
* Stop always inlining not-optimized get/setivarTakashi Kokubun2020-05-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As we have the optimization in _mjit_compile_ivar.erb, we don't use these functions if we successfully optimize ivars. Therefore it's consuming code size where we can't optimize it well. To decrease code size, we'd better avoid inlining them. ``` $ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark.yml --repeat-count=12 --output=all before --jit: ruby 2.8.0dev (2020-05-13T04:49:21Z master 61d451d6ce) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-05-13T05:46:59Z master a072d323db) +JIT [x86_64-linux] Calculating ------------------------------------- before --jit after --jit Optcarrot Lan_Master.nes 69.8567095356444 73.0360609399857 fps 70.3283101279035 74.6106251902062 72.9135395729567 75.2797344839106 76.6944690546044 77.5705757485036 77.0027971817715 78.2269524040059 78.5069033659736 78.4457471014131 80.1873218604913 80.1273811685818 81.3079566400696 81.7148593303302 81.7285827817226 81.7637234555871 81.7657097839637 82.4520295422720 81.8310114206406 82.7532354379759 81.9886488857863 82.8358739858206 ```
* Added test_gems.rb for setup dependenciesHiroshi SHIBATA2020-05-132-0/+53
|
* extlibs.rb: links in extracted directoryNobuyoshi Nakada2020-05-121-0/+36
| | | | | Allow to create symbolic links (if available) to share same or updated files.
* extlibs.rb: added variable referencesNobuyoshi Nakada2020-05-121-2/+25
| | | | Reduce duplicate parts such as package name and version numbers.
* delete mk_builtin_binary.rb卜部昌平2020-05-101-44/+0
| | | | To generate what is necessary via generic_erb.rb instead.
* delete mk_call_iseq_optimized.rb卜部昌平2020-05-101-73/+0
| | | | To generate what is necessary via generic_erb.rb instead.
* rbuninstall.rb: show paths without destdir as well as rbinstall.rbNobuyoshi Nakada2020-05-091-4/+5
|
* rbuninstall.rb: get rid of errors when prefix ends with "/."Nobuyoshi Nakada2020-05-091-0/+1
|
* rbuninstall.rb: print output record separator instead of $\Nobuyoshi Nakada2020-05-091-4/+4
|
* rbinstall.rb: get rid of installing duplicate filesNobuyoshi Nakada2020-05-091-1/+5
| | | | | Should not overwrite ext/rubyvm/lib/forwardable/impl.rb by lib/forwardable/impl.rb.
* rbinstall.rb: record bundled gem filesNobuyoshi Nakada2020-05-091-2/+9
|
* Workaround for Minitest5Hiroshi SHIBATA2020-05-082-0/+5
|
* Check encodings of STDIN,STDOUT,STDERR tooKazuhiro NISHIYAMA2020-05-081-12/+19
|
* Always correct sp on leave cancelTakashi Kokubun2020-05-061-3/+1
| | | | | | | | | | Even if local stack optimization is not used and values are written to VM stack, the stack pointer itself may not be moved properly. So this should be always moved on JIT cancellation. By the way it's hard to write a test for this because if we try to generate an interrupt, it will be a method call and it consumes the interrupt by itself on popping a frame.
* leakchecker.rb: try `lsof`Nobuyoshi Nakada2020-05-071-2/+9
|
* Makes nil-safeNobuyoshi Nakada2020-05-061-1/+1
|
* Ignore FDs kept by system libraryNobuyoshi Nakada2020-05-061-0/+13
| | | | | `getaddrinfo` on macOS seems keeping FDs to query host names internally.
* leakchecker.rb: search /dev/fd tooNobuyoshi Nakada2020-05-061-12/+12
| | | | It is more popular than /proc/self/fd.
* envutil.rb: Also alias to #nameNobuyoshi Nakada2020-05-051-2/+10
|
* Bison 3.5.91 now defaults parse.error to "simple"Nobuyoshi Nakada2020-05-041-0/+1
|
* Bison 3.59.1 folds yydestruct function headerNobuyoshi Nakada2020-05-041-0/+1
|
* Include unit id in a function name of an inlined methodTakashi Kokubun2020-04-301-1/+1
| | | | | I'm trying to make it possible to include all JIT-ed code in a single C file. This is needed to guarantee uniqueness of all function names
* fetch-bundled_gems.rb: Fixed the position of -cNobuyoshi Nakada2020-04-251-1/+1
|
* fetch-bundled_gems.rb: Quiet detached HEAD adviceNobuyoshi Nakada2020-04-251-2/+3
|
* `git co` is alias of `git checkout`Hiroshi SHIBATA2020-04-251-3/+3
|
* Initialize the class variable for Minitest::Unit.current_repeat_countNobuyoshi Nakada2020-04-231-0/+1
|
* Expand retrying test file names to realpathNobuyoshi Nakada2020-04-231-1/+1
| | | | As well as worker processes do in Test::Unit::Worker#run.
* [sync_default_gems.rb] Force reset conflict files to be ignoredNobuyoshi Nakada2020-04-201-3/+6
| | | | [ci skip]
* Revert irrelevant change [ci skip]Nobuyoshi Nakada2020-04-201-7/+3
|
* Removed phony atomic operations for void* and VALUENobuyoshi Nakada2020-04-201-3/+7
|
* Make sure newarraykwsplat accesses a correct indexTakashi Kokubun2020-04-181-1/+1
| | | | | | | on stack when local_stack_p is enabled. This fixes `RB_FL_TEST_RAW:"RB_FL_ABLE(obj)"` assertion failure on power_assert's test with JIT enabled.
* Rescue EPIPE in _reportNobuyoshi Nakada2020-04-171-21/+13
| | | | Instead of letting callers rescue the error always.
* core_assertions.rb: fixed fd leak at timeoutNobuyoshi Nakada2020-04-171-0/+2
|
* envutil.rb: not try to close pipes twiceNobuyoshi Nakada2020-04-171-2/+4
|
* Make vm_call_cfunc_with_frame a fastpath (#3027)Takashi Kokubun2020-04-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when there's no need to call CALLER_SETUP_ARG and CALLER_REMOVE_EMPTY_KW_SPLAT (i.e. !rb_splat_or_kwargs_p(ci) && !calling->kw_splat). Micro benchmark: ``` $ benchmark-driver -v --rbenv 'before;after' benchmark/vm_send_cfunc.yml --repeat-count=4 before: ruby 2.8.0dev (2020-04-13T23:45:05Z master b9d3ceee8f) [x86_64-linux] after: ruby 2.8.0dev (2020-04-14T00:48:52Z no-splat-fastpath 418d363722) [x86_64-linux] Calculating ------------------------------------- before after vm_send_cfunc 69.585M 88.724M i/s - 100.000M times in 1.437097s 1.127096s Comparison: vm_send_cfunc after: 88723605.2 i/s before: 69584737.1 i/s - 1.28x slower ``` Optcarrot: ``` $ benchmark-driver -v --rbenv 'before;after' benchmark.yml --repeat-count=12 --output=all before: ruby 2.8.0dev (2020-04-13T23:45:05Z master b9d3ceee8f) [x86_64-linux] after: ruby 2.8.0dev (2020-04-14T00:48:52Z no-splat-fastpath 418d363722) [x86_64-linux] Calculating ------------------------------------- before after Optcarrot Lan_Master.nes 50.76119601545175 42.73858236484051 fps 50.76388649761503 51.04211379912850 50.80930672252514 51.39455790755538 50.90236000778749 51.75656936556145 51.01744746340430 51.86875277356489 51.06495279015112 51.88692482485558 51.07785337168974 51.93429603190578 51.20163525187862 51.95768145071314 51.34671771913112 52.45577266040274 51.35918340835583 52.53163888762858 51.46641337418146 52.62172484121034 51.50835463462257 52.85064021113239 ```
* Unwrap vm_call_cfunc indirection on JITTakashi Kokubun2020-04-131-21/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for VM_METHOD_TYPE_CFUNC. This has been known to decrease optcarrot fps: ``` $ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark.yml --repeat-count=24 --output=all before --jit: ruby 2.8.0dev (2020-04-13T16:25:13Z master fb40495cd9) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-04-13T23:23:11Z mjit-inline-c bdcd06d159) +JIT [x86_64-linux] Calculating ------------------------------------- before --jit after --jit Optcarrot Lan_Master.nes 66.38132676191719 67.41369177299630 fps 69.42728743772243 68.90327567263054 72.16028300263211 69.62605130880686 72.46631319102777 70.48818243767207 73.37078877002490 70.79522887347566 73.69422431217367 70.99021920193194 74.01471487018695 74.69931965402584 75.48685183295630 74.86714575949016 75.54445264507932 75.97864419721677 77.28089738169756 76.48908637569581 78.04183397891302 76.54320932488021 78.36807984096562 76.59407262898067 78.92898762543574 77.31316743361343 78.93576483233765 77.97153484180480 79.13754917503078 77.98478782102325 79.62648945850653 78.02263322726446 79.86334213878064 78.26333724045934 80.05100635898518 78.60056756355614 80.26186843769584 78.91082645644468 80.34205717020330 79.01226659142263 80.62286066044338 79.32733939423721 80.95883033058557 79.63793060542024 80.97376819251613 79.73108936622778 81.23050939202896 80.18280109433088 ``` and I deleted this capability in an early stage of YARV-MJIT development: https://github.com/k0kubun/yarv-mjit/commit/0ab130feeefc2b9078a1077e4fec93b3f5e45d07 I suspect either of the following things could be the cause: * Directly calling vm_call_cfunc requires more optimization effort in GCC, resulting in 30ms-ish compilation time increase for such methods and decreasing the number of methods compiled in a benchmarked period. * Code size increase => icache miss hit These hypotheses could be verified by some methodologies. However, I'd like to introduce this regardless of the result because this blocks inlining C method's definition. I may revert this commit when I give up to implement inlining C method definition, which requires this change. Microbenchmark-wise, this gives slight performance improvement: ``` $ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_send_cfunc.yml --repeat-count=4 before --jit: ruby 2.8.0dev (2020-04-13T16:25:13Z master fb40495cd9) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-04-13T23:23:11Z mjit-inline-c bdcd06d159) +JIT [x86_64-linux] Calculating ------------------------------------- before --jit after --jit mjit_send_cfunc 41.961M 56.489M i/s - 100.000M times in 2.383143s 1.770244s Comparison: mjit_send_cfunc after --jit: 56489372.5 i/s before --jit: 41961388.1 i/s - 1.35x slower ```
* Fixed to initialize ruby-core repository when it has no master branchHiroshi SHIBATA2020-04-091-2/+4
|
* Support one repository for updating the latest commitsHiroshi SHIBATA2020-04-091-1/+5
|
* Merge pull request #2991 from shyouhei/ruby.h卜部昌平2020-04-081-0/+17
| | | Split ruby.h
* Remove unused variable stack_sizeTakashi Kokubun2020-04-061-5/+0
| | | | _mjit_compile_send.erb doesn't use _mjit_compile_insn_body.erb
* Delay definition of pc_moved_pTakashi Kokubun2020-04-063-3/+2
| | | | | | | to unify the duplicated declarations and to make sure it's not used until set properly. Also changed it from legacy TRUE/FALSE to stdbool.
* Fix -Wshorten-64-to-32 in 4f802828f4Takashi Kokubun2020-04-061-1/+1
|
* Refactor `argc` in mjit_compile_sendTakashi Kokubun2020-04-061-9/+6
| | | | | using sp_inc_of_sendish for consistency and to make it easier to understand