summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-03-03insns.def: unwrap vm_exec for yieldk0kubun
Outer vm_exec can catch longjmp. We don't need to call vm_exec first here. This optimizes JIT-ed yield: * Benchmark script ``` require 'benchmark_driver' Benchmark.driver do |x| x.prelude %{ def yielder yield + 1 end } x.report 'yielder', %{ yielder { 1 } } x.loop_count 300_000_000 x.rbenv 'before', 'before,--jit', 'after', 'after,--jit' x.verbose end ``` * Result before: ruby 2.6.0dev (2018-03-03 trunk 62642) [x86_64-linux] before,--jit: ruby 2.6.0dev (2018-03-03 trunk 62642) +JIT [x86_64-linux] after: ruby 2.6.0dev (2018-03-03 trunk 62642) [x86_64-linux] last_commit=insns.def: unwrap vm_exec for yield after,--jit: ruby 2.6.0dev (2018-03-03 trunk 62642) +JIT [x86_64-linux] last_commit=insns.def: unwrap vm_exec for yield Calculating ------------------------------------- before before,--jit after after,--jit yielder 37.214M 29.222M 35.904M 38.035M i/s - 300.000M times in 8.061581s 10.266312s 8.355716s 7.887447s Comparison: yielder after,--jit: 38035121.0 i/s before: 37213544.0 i/s - 1.02x slower after: 35903565.7 i/s - 1.06x slower before,--jit: 29221787.6 i/s - 1.30x slower git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-03* 2018-03-03svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-03vm.c: add mjit_enable_p flagk0kubun
to count up total calls properly. Some places (especially CALL_METHOD) invoke mjit_exec twice for one method call. It would be problematic when debugging, or possibly it would result in a wrong profiling result. This commit doesn't have impact for performance: * Optcarrot benchmark ** before fps: 59.37757770848619 fps: 56.49998488958699 fps: 59.07900362739362 fps: 58.924749807695996 fps: 57.667905665594894 fps: 57.540021018385254 fps: 59.5518055679647 fps: 55.93831555148311 fps: 57.82685112863262 fps: 59.22391754481736 checksum: 59662 ** after fps: 58.461881158098194 fps: 59.32685183081354 fps: 54.11334310279802 fps: 59.2281560439788 fps: 58.60495705318312 fps: 55.696478648491045 fps: 58.49003452654724 fps: 58.387771929393224 fps: 59.24156772816439 fps: 56.68804731968107 checksum: 59662 * Discourse Your Results: (note for timings- percentile is first, duration is second in millisecs) ** before (without JIT) categories_admin: 50: 16 75: 17 90: 24 99: 37 home_admin: 50: 20 75: 20 90: 24 99: 42 topic_admin: 50: 16 75: 16 90: 18 99: 28 categories: 50: 36 75: 37 90: 45 99: 68 home: 50: 38 75: 40 90: 53 99: 92 topic: 50: 14 75: 15 90: 17 99: 26 ** after (without JIT) categories_admin: 50: 16 75: 16 90: 24 99: 36 home_admin: 50: 19 75: 20 90: 23 99: 41 topic_admin: 50: 16 75: 16 90: 19 99: 33 categories: 50: 35 75: 36 90: 44 99: 61 home: 50: 38 75: 40 90: 52 99: 101 topic: 50: 14 75: 15 90: 15 99: 24 ** before (with JIT) categories_admin: 50: 19 75: 23 90: 29 99: 44 home_admin: 50: 24 75: 26 90: 32 99: 46 topic_admin: 50: 20 75: 22 90: 27 99: 44 categories: 50: 41 75: 43 90: 51 99: 66 home: 50: 46 75: 49 90: 56 99: 68 topic: 50: 18 75: 19 90: 22 99: 31 ** after (with JIT) categories_admin: 50: 18 75: 21 90: 28 99: 42 home_admin: 50: 23 75: 25 90: 31 99: 51 topic_admin: 50: 19 75: 20 90: 24 99: 31 categories: 50: 41 75: 44 90: 52 99: 69 home: 50: 45 75: 48 90: 61 99: 88 topic: 50: 19 75: 20 90: 24 99: 33 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02openssl: search winsocknobu
* ext/openssl/extconf.rb: on Windows search winsock library always, regardless pkg-config. direct use of winsock is not region of OpenSSL. [ruby-core:85895] [Bug #14568] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02Clarify the documentation of the YAML module [Misc #14567]eregon
Based on a patch from Victor Shepelev git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02io/console: drop 2.1.0 support [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02io/console: drop 2.0.0 support [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02Makefile.sub: need suffixnobu
* win32/Makefile.sub: fix missing suffix of user32.lib. [Bug #14422] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02Makefile.sub: link user32.libnobu
* win32/Makefile.sub: always link user32.lib which provides a lot of very common library functions. [Bug #14422] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02search winsock libraries explicitlynobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02configure.ac: library options to MAINLIBSnobu
* configure.ac (MAINLIBS): moved library options for main program and static libruby, and append MAINLIBS to LIBRUBYARG_STATIC, as these libraries are not needed for linking to shared libruby. [ruby-core:85882] [Bug #14422] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02Makefile.in (ruby.pc): phony target [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02configure.ac: fix up r59130nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01* 2018-03-02svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01MJIT specific flagsnobu
Passing options to configure like as `configure MJIT_OPTFLAGS=-O MJIT_DEBUGFLAGS=-g` overrides options to be used to compile JIT code, separately from the default options to be used for ruby itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01compile.c: raise on invalid inputnobu
* compile.c (ibf_load_object_unsupported, ibf_load_object_class): should raise an exception. rejection of invalid input is not a bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01compile.c: do not truncate VALUE to longnobu
* compile.c (ibf_dump_object_regexp): do not truncate VALUE to long. it makes invalid VALUE on IL32LLP64 platforms where long is shorter than VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01parse.y: refine assign_in_cond warningnobu
* parse.y (assign_in_cond): refine a warning message for assignment of a literal in conditinal expression. [ruby-core:85872] [Bug #14562] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01tool/bisect.sh: extracted build part [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01bisect.sh: make srcs in builddir [ci skip]nobu
* tool/bisect.sh: also srcs needs Makefile, must in the build but not the source directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01compile.c: fix load_from_binarynobu
* compile.c (ibf_load_iseq_each): realpath may be nil. follow up r59709. [fix https://github.com/Shopify/bootsnap/issues/132] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28* 2018-03-01svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28Revert r61936 "compile.c: use ALLOCV_N"nobu
* compile.c (ibf_dump_object_list): `dump->obj_list` is not fixed yet, as new objects are pushed by lbf_dump_object_object. fixes crash by buffer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28NEWS: resurrect ticket number [ci skip]k0kubun
which was unintentionally dropped at r62612. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28common.mk: clean timestamp and intermediate headernobu
[ci-skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28erb.rb: relax warn level of ERB.newk0kubun
I changed my mind and thought branching ERB.new in all libraries is too hard. Code becomes too ugly. I increased the warn level to 2, and the old initializer will be removed when Ruby 2.5 becomes EOL. -S option of erb(1) stays in the same policy: will be removed at Ruby 2.7. NEWS: note about the direction git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28Prefer to use %x instead of backtick.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28skip a test if another Thread is running.ko1
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): this test checks no object allocation while specific process, however another thread can generate objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28file.c: realpath on special symlinknobu
* file.c (realpath_rec): fallback to symlink path when it is accessible but the link target is not actual entry on file systems. [ruby-dev:50487] [Bug #14557] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28file.c: get rid of useless conversionnobu
* file.c (rb_file_s_stat): File.stat does not accept an IO object as trying conversion to path name string first. skip conversion to IO and try stat(2) only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Update to ruby/spec@51f301deregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Remove tool/pull-latest-mspec-speceregon
* It is now part of mspec in spec/mspec/tool/pull-latest-mspec-spec git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Update to ruby/spec@cbe855ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Update to ruby/mspec@d287466eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27* 2018-02-28svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Support two `to_r`-responding args in Rational()mrkn
* rational.c (nurat_s_convert): call `to_r` to convert non-Numeric objects also if argc == 2 in Rational(). * test/ruby/test_rational.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27common.mk: added missing dependencies on id.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27[EXPERIMENTAL] Support upload option for s3 package hosting.hsbt
Example: $ ruby tool/make-snapshot -archname=snapshot -s3=tmp /tmp trunk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27random.c: Random.extend Formatternobu
* random.c (InitVM_Random): extend Random itself by Formatter module, as well as the `bytes` method used by the module. [Feature #4938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Refactor ERB version checking for keyword argumentsk0kubun
Improving code like r62590. See r62529 for details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27defs/id.def: predefine to_f IDnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27* 2018-02-27svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27complex.c: use predefined IDsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26tool/ruby_vm/helpers/dumper.rb: check ERB versionk0kubun
I could not `make` trunk (62585) without this patch. ``` $ make -j4 && make install BASERUBY = /home/pocke/.rbenv/shims/ruby --disable=gems CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Werror=misleading-indentation -Wno-overlength-strings -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wmissing-noreturn -Wimplicit-fallthrough=0 -Werror=duplicated-cond -Werror=restrict -std=gnu99 -fPIC XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT CPPFLAGS = -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/10.0.0 DLDFLAGS = -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.2.6 -fstack-protector SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm LANG = en_GB.UTF-8 LC_ALL = LC_CTYPE = gcc (GCC) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. generating opt_sc.inc generating optunifs.inc generating insns.inc generating insns_info.inc Traceback (most recent call last): 6: from ./tool/insns2vm.rb:9:in `<main>' 5: from ./tool/insns2vm.rb:9:in `each' 4: from ./tool/insns2vm.rb:10:in `block in <main>' 3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate' 2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render' 1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) make: *** [Makefile:534: opt_sc.inc] Error 1 make: *** Waiting for unfinished jobs.... Traceback (most recent call last): 6: from ./tool/insns2vm.rb:9:in `<main>' 5: from ./tool/insns2vm.rb:9:in `each' 4: from ./tool/insns2vm.rb:10:in `block in <main>' 3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate' 2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render' 1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) make: *** [Makefile:534: optunifs.inc] Error 1 Traceback (most recent call last): 6: from ./tool/insns2vm.rb:9:in `<main>' 5: from ./tool/insns2vm.rb:9:in `each' 4: from ./tool/insns2vm.rb:10:in `block in <main>' 3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate' 2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render' 1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) Traceback (most recent call last): 6: from ./tool/insns2vm.rb:9:in `<main>' 5: from ./tool/insns2vm.rb:9:in `each' 4: from ./tool/insns2vm.rb:10:in `block in <main>' 3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate' 2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render' 1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) make: *** [Makefile:534: insns.inc] Error 1 make: *** [Makefile:534: insns_info.inc] Error 1 ``` I guess this issue is same as https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/62531 So I applied the same change to tool/ruby_vm/helpers/dumper.rb also. close https://github.com/ruby/ruby/pull/1826 Co-authored-by: Masataka Pocke Kuwabara <kuwabara@pocke.me> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26use convert_type_with_idnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26use convert_type_with_idnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26Makefile.in: fix portability issuenobu
* Makefile.in (mjit_config.h): Alternative value with $@ and printf without argument are not portable, could fail on some platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26r62071 is backported into Ruby 2.5 [Bug #14407]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e