summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-27Specs must keep working on older versions and other implementationseregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-27jit_support.rb: debug check_support stderrk0kubun
rubyci freebsd11zfs doesn't pass this check. I want to know the stderr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-27st.c: remove redundant export declarationk0kubun
rb_hash_bulk_insert is added to official C API in r63488. It's no longer exported only for MJIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-27* 2018-05-27svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-27jit_support.rb: cahce JIT support checkk0kubun
* Before make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb" 22.40s user 5.38s system 91% cpu 30.196 total * After make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb" 12.91s user 3.33s system 91% cpu 17.648 total Also, this makes it easier to check if JIT is actually tested, by showing warning on stderr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24spec/ruby: fix RUBY_DESCRIPTION check with JIT enabledk0kubun
`make test-spec` adds `-r./$(arch)-fake` to pass header options. But the $(arch)-fake.rb unexpectedly modifies RUBY_DESCRIPTION and it always drops +JIT from it since the fake.rb is built with BOOTSTRAPRUBY, which can be miniruby. miniruby can't find MJIT header and thus mjit_init_p is always FALSE. So, to pass `make test-spec` with JIT enabled, we can't use RUBY_DESCRIPTION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24test_rubyoptions.rb: RbConfig::CONFIG['cppflags'] can be nilk0kubun
not '' at least on AppVeyor git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24test_rubyoptions.rb: allow passing test_verbosek0kubun
with -DMJIT_FORCE_ENABLE. With -DMJIT_FORCE_ENABLE, absence of --jit doesn't mean JIT disabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24mjit.c: use remove_file in clean_so_file toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24thread_pthread.c: avoid reading th pointer for thread cachenormal
I suspect GC may free the rb_thread_t (th) pointer by the time we call register_cached_thread_and_wait. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-23thread_pthread.c: enable thread cache by defaultnormal
Since r62466 ("thread_pthread.c: shorten and fix thread cache implementation"), our thread cache is no longer buggy with programs using fork. This makes significant improvements in vm_thread_alive_check1 and vm_thread_create_join benchmarks and does not introduce regressions. Unlike old thread cache, I've changed the cache to only last 3 seconds since per-thread setup in most programs rarely takes more than a few milliseconds to re-establish things like network connections. This is configurable by changing the THREAD_CACHE_TIME variable. I hope this allows users to simplify their code by removing the need for thread pools in many cases. vm_thread_alive_check1 10.872 0.150 vm_thread_close 1.988 2.027 vm_thread_condvar1 0.751 0.767 vm_thread_condvar2 0.744 0.752 vm_thread_create_join 5.296 2.343 vm_thread_mutex1 1.911 1.892 vm_thread_mutex2 1.902 1.896 vm_thread_mutex3 2.389 2.313 vm_thread_pass 0.271 0.272 vm_thread_pass_flood 0.175 0.179 vm_thread_pipe 0.460 0.436 vm_thread_queue 0.453 0.446 vm_thread_sized_queue 0.547 0.547 vm_thread_sized_queue2 1.417 1.413 vm_thread_sized_queue3 1.410 1.426 vm_thread_sized_queue4 0.787 0.791 Speedup ratio: compare with the result of `trunk' (greater is better) name built vm_thread_alive_check1 72.456 vm_thread_close 0.981 vm_thread_condvar1 0.979 vm_thread_condvar2 0.990 vm_thread_create_join 2.260 vm_thread_mutex1 1.010 vm_thread_mutex2 1.003 vm_thread_mutex3 1.033 vm_thread_pass 0.994 vm_thread_pass_flood 0.980 vm_thread_pipe 1.055 vm_thread_queue 1.016 vm_thread_sized_queue 0.999 vm_thread_sized_queue2 1.003 vm_thread_sized_queue3 0.989 vm_thread_sized_queue4 0.995 [ruby-core:87030] [Feature #14757] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-23benchmark/bm_*erb*: fix for --measure=size/peak in driver.rbnormal
benchmark/memory_wrapper.rb will Kernel#load these scripts, preventing DATA from being initialized, so use heredoc instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-23* 2018-05-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-23ext/pty/pty.c: I_FIND before I_PUSH if possiblengoto
* ext/pty/pty.c: Check whether each STREAMS module is already pushed or not by using I_FIND ioctl call, before pushing it by using I_PUSH. Solved test failure on Solaris. On a Solaris 10 machine, ioctl I_PUSH "ldterm" twice was the cause of duplicated "\r". [Bug #14786] [ruby-dev:50552] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-23remove VM_ENV_DATA_INDEX_ENV_PROC.ko1
* vm_core.h (VM_ENV_DATA_INDEX_ENV_PROC): ep[VM_ENV_DATA_INDEX_ENV_PROC] is allocated to mark a Proc which is created from iseq block. However, `lep[0]` keeps Proc object itself as a block handler (Proc). So we don't need to keep it. * vm_core.h (VM_ENV_PROCVAL): ditto. * vm.c (vm_make_env_each): do not need to keep blockprocval as special value. * vm.c (vm_block_handler_escape): simply return Proc value. * proc.c (proc_new): we don't need to check Env because a Proc type block handler is a Proc object itself. [Bug #14782] * test/ruby/test_proc.rb: add a test for [Bug #14782] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-23internal.h: export ruby_sized_* for systems w/o malloc_usable_sizenormal
[ruby-core:87232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22test_jit.rb: propagate suspicious stderrk0kubun
of child ruby process to parent stderr using `Kernel#warn`. This fixes a warning in {set,get}classvariable as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22* 2018-05-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22mjit.c: show error message on remove failurek0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22rename temporary dummy targetusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22export rb_hash_bulk_insertnaruse
msgpack-ruby requests this function public because they want to create a hash with bulk key value pairs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22string.c: MAYBE_UNUSED to suppress warnings for `old`normal
Building with HAVE_MALLOC_USABLE_SIZE currently makes SIZED_REALLOC_N ignore the old size arg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22gc.c: use RUBY_DEFAULT_FREE instead of open-coded constantnormal
Improves readability and makes future changes easier git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22string.c: size hints for free and realloc callsnormal
Another part of the plan to reduce dependencies on malloc_usable_size: https://bugs.ruby-lang.org/issues/10238 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22parse.y: use ruby_sized_xfree and SIZED_REALLOC_Nnormal
Another part of the plan to reduce dependencies on malloc_usable_size which costs us speed: https://bugs.ruby-lang.org/issues/10238 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21load.c: use ruby_sized_xfree for calloc-ed RArray VALUEnormal
IMHO, this increases readability, too, since it's not immediately clear that the object is on the malloc heap and not a regular Ruby object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21* 2018-05-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21array.c: use ruby_sized_free and SIZED_REALLOC_Nnormal
Part of the plan to reduce dependencies on malloc_usable_size which costs us speed: https://bugs.ruby-lang.org/issues/10238 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21mjit.h: skip accessing mjit_opts if JIT-edk0kubun
We want to skip checking `mjit_opts.wait` for already JIT-ed case. Optcarrot is slightly improved like 65.20 fps -> 66.60 fps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21mention about `goruby` target in helpusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21now can do `make goruby`usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21ruby.c: localize a variablenobu
* ruby.c (ruby_init_loadpath_safe): moved libdir to the block where it is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21ruby.c: runtime_libruby_pathnobu
* ruby.c (runtime_libruby_path): hoisted out platform dependent routine to get the loaded runtime library path. cygwin_conv_path does path separator and WCHAR to UTF-8 conversions too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21added `f` for 1 byte FizzBuzz because Hexagony has such featureusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-21explicit cast to void* required for %pshyouhei
No automatic type promotion is expected for variadic arguments. You have to do it by hand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-20goruby build was brokenusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-20should propagate V to sub makeusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-20goruby build was brokenusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-20* 2018-05-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-20get rid of unused variable warning.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-19iseq.c: Fix segfault when debug is not 0yui-knk
* iseq.c (get_insn_info_succinct_bitvector): If VM_CHECK_MODE is 0, `body->insns_info.positions` is freed in `rb_iseq_insns_info_encode_positions`. Print `position` only when VM_CHECK_MODE is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-19vm_core.h: Remove duplicate declarationyui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-19* 2018-05-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-19fileutils.rb: split fu_windows?nobu
* lib/fileutils.rb (FileUtils::StreamUtils_#fu_windows?): select the method definition for each platforms, and dropped supports for deprecated platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18Revert "gc.c: use monotonic counters for objspace_malloc_increase"normal
There were major size regressions I failed to notice before in: bm_array_sample_100k__6k bm_array_sample_100k___10k bm_array_sample_100k___50k This reverts commit r63463 / 14fb10a9ec41c77a91a778ca2f705c1897958afb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18gc.c: use monotonic counters for objspace_malloc_increasenormal
atomic_sub_nounderflow is expensive and objspace_malloc_increase was showing up near the top of some `perf` profiles. The new implementation allows the compiler to inline and eliminate some branches from objspace_malloc_increase. Furthermore, we do not need atomics for oldmalloc_increase This consistently improves bm_so_count_words benchmark by around 10% on my hardware. name built so_count_words 1.107 [ruby-core:87096] [Feature #14767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18thread.c (rb_wait_for_single_fd): do not leak EINTR on timeoutnormal
We must not leak EINTR to users in case a signal hits a ppoll/select caller right when (or just before) the timeout expires. In other words, the timeout should take precedence over the -1 result from ppoll or select. We also try one more time in case of EINTR with a zero timeout, since technically the syscall finished before timing out if it returns EINTR. Regression appeared in r62457 ("thread.c (update_timespec): use timespec_update_expire", commit e6bf0128add103730d8c96727f3ed4dab95088e4) and is not in any stable release of Ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18Merge RubyGems 2.7.7hsbt
see release details here: https://blog.rubygems.org/2018/05/18/2.7.7-released.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18tool: fixed shadowing variablesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18tool: removed unused variablesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e