aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Unused macro and fieldyui-knk2018-05-282-7/+0
| | | | | | | | * node.h (nd_cfnc, struct RNode): nd_cfnc has been unused since r49938, and also cfunc field. * .gdbinit (nd_cfnc): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-05-28svn2018-05-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge etc gemspec from github repository.hsbt2018-05-281-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Specs must keep working on older versions and other implementationseregon2018-05-272-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* jit_support.rb: debug check_support stderrk0kubun2018-05-271-1/+5
| | | | | | 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
* st.c: remove redundant export declarationk0kubun2018-05-271-1/+1
| | | | | | | 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-27svn2018-05-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* jit_support.rb: cahce JIT support checkk0kubun2018-05-271-12/+21
| | | | | | | | | | | | | * 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
* spec/ruby: fix RUBY_DESCRIPTION check with JIT enabledk0kubun2018-05-242-3/+18
| | | | | | | | | | | | | `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
* test_rubyoptions.rb: RbConfig::CONFIG['cppflags'] can be nilk0kubun2018-05-241-1/+1
| | | | | | not '' at least on AppVeyor git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rubyoptions.rb: allow passing test_verbosek0kubun2018-05-241-1/+5
| | | | | | | 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
* mjit.c: use remove_file in clean_so_file toonobu2018-05-241-4/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: avoid reading th pointer for thread cachenormal2018-05-241-4/+4
| | | | | | | 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
* thread_pthread.c: enable thread cache by defaultnormal2018-05-231-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* benchmark/bm_*erb*: fix for --measure=size/peak in driver.rbnormal2018-05-232-24/+22
| | | | | | | | 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-24svn2018-05-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/pty/pty.c: I_FIND before I_PUSH if possiblengoto2018-05-231-6/+21
| | | | | | | | | | | * 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
* remove VM_ENV_DATA_INDEX_ENV_PROC.ko12018-05-234-32/+16
| | | | | | | | | | | | | | | | | | | | | | * 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
* internal.h: export ruby_sized_* for systems w/o malloc_usable_sizenormal2018-05-231-0/+2
| | | | | | [ruby-core:87232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_jit.rb: propagate suspicious stderrk0kubun2018-05-221-4/+16
| | | | | | | | 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-23svn2018-05-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c: show error message on remove failurek0kubun2018-05-221-4/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rename temporary dummy targetusa2018-05-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* export rb_hash_bulk_insertnaruse2018-05-222-3/+2
| | | | | | | 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
* string.c: MAYBE_UNUSED to suppress warnings for `old`normal2018-05-221-2/+2
| | | | | | | 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
* gc.c: use RUBY_DEFAULT_FREE instead of open-coded constantnormal2018-05-221-1/+1
| | | | | | Improves readability and makes future changes easier git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: size hints for free and realloc callsnormal2018-05-221-8/+13
| | | | | | | 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
* parse.y: use ruby_sized_xfree and SIZED_REALLOC_Nnormal2018-05-221-7/+7
| | | | | | | 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
* load.c: use ruby_sized_xfree for calloc-ed RArray VALUEnormal2018-05-211-1/+1
| | | | | | | | 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-22svn2018-05-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: use ruby_sized_free and SIZED_REALLOC_Nnormal2018-05-211-2/+2
| | | | | | | 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
* mjit.h: skip accessing mjit_opts if JIT-edk0kubun2018-05-211-6/+3
| | | | | | | 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
* mention about `goruby` target in helpusa2018-05-211-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* now can do `make goruby`usa2018-05-211-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c: localize a variablenobu2018-05-211-9/+9
| | | | | | | * 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
* ruby.c: runtime_libruby_pathnobu2018-05-211-49/+51
| | | | | | | | | * 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
* added `f` for 1 byte FizzBuzz because Hexagony has such featureusa2018-05-211-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* explicit cast to void* required for %pshyouhei2018-05-211-4/+4
| | | | | | | | | 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
* goruby build was brokenusa2018-05-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* should propagate V to sub makeusa2018-05-201-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* goruby build was brokenusa2018-05-203-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-05-21svn2018-05-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* get rid of unused variable warning.usa2018-05-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: Fix segfault when debug is not 0yui-knk2018-05-191-4/+10
| | | | | | | | | * 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
* vm_core.h: Remove duplicate declarationyui-knk2018-05-191-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-05-19svn2018-05-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fileutils.rb: split fu_windows?nobu2018-05-191-6/+5
| | | | | | | | * 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
* Revert "gc.c: use monotonic counters for objspace_malloc_increase"normal2018-05-181-49/+20
| | | | | | | | | | | | 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
* gc.c: use monotonic counters for objspace_malloc_increasenormal2018-05-181-20/+49
| | | | | | | | | | | | | | | | | | | 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
* thread.c (rb_wait_for_single_fd): do not leak EINTR on timeoutnormal2018-05-181-18/+33
| | | | | | | | | | | | | | | | | | 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