summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-27* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge rdoc-6.1.0.beta1.hsbt
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* 2018-08-27svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge psych-3.1.0.pre1.hsbt
* Update bundled libyaml-0.2.1 from 0.1.7. https://github.com/ruby/psych/pull/368 * Unify Psych's API: To use keyword arguments with method call. https://github.com/ruby/psych/pull/358 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-26test/ruby/test_io.rb (test_recycled_fd_close): Linux workaroundnormal
Arch Linux CI still seems to timeout on this test... Note, I can't reproduce the failures in these tests on a FreeBSD 11.1 VM while infinite-looping, even without the "th.join(0.001)". It doesn't seem related to the use of rb_wait_for_single_fd (r64529). cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-trunk/log/20180826T090003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-26thread_sync.c: common wakeup_{one,all} implementationnormal
This let us avoid looping in rb_szqueue_max_set, saves us some lines of code and reduces binary size slightly (numbers from 32-bit x86): text data bss dec hex filename before: 91272 392 156 91820 166ac thread.o after: 91200 392 156 91748 16664 thread.o Inspiration from this taken from the FUTEX_WAKE op of the Linux futex(2) syscall. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-26process.c: remove worthless waitpid_sys macronormal
It is identical to do_waitpid, and the win32 version will not be needed for MJIT (since win32 does not suffer from the waitpid(-1, ...) conflict where waits can get stolen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25test/io/wait/test_io_wait_uncommon.rb: relax /dev/random checknormal
Too many machines lack entropy to have a usable /dev/random. I had similar problems on my system until I started using haveged(8), but we can't require that for CI. cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-trunk/log/20180825T213003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread_pthread.c (ubf_wakeup_thread): `th' is never NULLnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread_pthread.c: main thread always gets hit by signalsnormal
We need to ensure Signal.trap handlers can function if the main thread is sleeping after a subthread has grabbed sigwait_fd, but later exited. Consider the following timeline: main_thread sub-thread ----------------------------------------- Signal.trap() { ... } get sigwait_fd ppoll on sigwait_fd native_cond_sleep (via pthread_cond_wait) ppoll times-out put sigwait_fd sub-thread exits only thread alive SIGNAL HITS The problem is pthread_cond_wait cannot return EINTR, so we can never run the Signal.trap handler. So we will avoid using native_cond_sleep in the main thread and always use ppoll to sleep when in the main thread. This can guarantee the main thread remains aware of signals; even if it cannot safely read off sigwait_fd git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25* 2018-08-26svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread.c: quiet down -Wmaybe-uninitialized on gcc 7.[2-3]normal
Haven't tested gcc 8, yet; but gcc 6 seems fine.... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25hrtime.h: add documentationnormal
I updated the patch with documentation but forgot about it, earlier :x [ruby-core:88616] [Misc #15014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread.c: use rb_hrtime_t scalar for high-resolution time operationsnormal
Relying on "struct timespec" was too annoying API-wise and used more stack space. "double" was a bit wacky w.r.t rounding in the past, so now we'll switch to using a 64-bit type. Unsigned 64-bit integer is able to give us over nearly 585 years of range with nanoseconds. This range is good enough for the Linux kernel internal time representation, so it ought to be good enough for us. This reduces the stack usage of functions while GVL is held (and thus subject to marking) on x86-64 Linux (with ppoll): rb_wait_for_single_fd 120 => 104 do_select 120 => 88 [ruby-core:88582] [Misc #15014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25drb: close graceful shutdown pipe before socketnormal
Closing a listen socket while entering select(2) may trigger IOError or even deadlock because another thread may give the file descriptor to another file description; meaning the kernel can wait on the wrong description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25drb: simplify shutdown pipe close logicnormal
IO#close is idempotent, so we don't need to waste bytecode to check or nil it at shutdown time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24Add AIX guardsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24test/ruby/test_io.rb (test_recycled_fd_close): use IO#read to avoid ppoll callnormal
IO#sysread calls rb_wait_for_single_fd for compatibility, and perhaps something is amiss with that (unrelated to timer-thread elimination) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24* 2018-08-25svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24thread_pthread.c: use eventfd instead of pipe on Linuxnormal
Based on r64478, any regular user creating more than 1024 pipes on Linux will end up with tiny pipes with only a single page capacity. So avoid wasting user resources and use lighter eventfd on Linux. [ruby-core:88563] [Misc #15011] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24ext/readline/extconf.rb: try using more readline APIsk0kubun
on MinGW. [Bug #15020] From: MSP-Greg <Greg.mpls@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23test/readline/test_readline.rb: fix readline testk0kubun
for mingw. test/lib/minitest/unit.rb: Add 'guards' for mingw. Removed still-unused method `mswin?` from original patch. [Fix GH-1941] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23thread_pthread.c (ubf_timer_destroy): remove redundant getpid checknormal
TIMER_THREAD_CREATED_P already checks that pid, and glibc 2.25+ no longer caches getpid(2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23* 2018-08-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23NEWS: add entries for rb_waitpid and timer-thread [ci skip]normal
Some of these changes may affect debugging and tracing tools [Bug #14867] [ruby-core:88199] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23iseq.c (rb_vm_encoded_insn_data_table_init): add a cast to build on clangmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23Mention `--enable=jit` instead of `--jit`kazu
"--jit" flag usage may be deprecated at r63995 [Feature #14878] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23iseq.c (rb_iseq_trace_set): refactoring by using encoded_insn_datamame
Now it uses encoded_insn_data to identify and replace each encoded insn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23iseq.c: add a map from encoded insn to insn datamame
This enhances rb_vm_insn_addr2insn which retrieves a decoded insn number from encoded insn. The insn data table include not only decoded insn number, but also its len, trace and non-trace version of encoded insn. This table can be used to simplify trace instrumentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23compile.c: drop unused arraynobu
* compile.c (iseq_peephole_optimize): drop unused dynamic array literal, without concatenation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23compile.c: drop unused stringnobu
* compile.c (iseq_peephole_optimize): drop unused dynamic string literal, without concatenation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23remove `const` warning.ko1
* compile.c (iseq_ibf_load): remove `const` to pass iseq as no `const` parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23check trace flags at loading [Bug #14702]ko1
* iseq.c (iseq_init_trace): at ISeq loading time, we need to check `ruby_vm_event_enabled_flags` to turn on trace instructions. Seprate this checking code from `finish_iseq_build()` and make new function. `iseq_ibf_load()` calls this funcation after loading. * test/ruby/test_iseq.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22Also skip on AIXnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22compile.c: pop literal object in conditionnobu
* compile.c (compile_branch_condition): pop dynamic literal object, which is never nil/false, as the branch condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22* 2018-08-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22parse.y (arg_append): support NODE_ARGSCAT casemame
Because of the lack of this case, `[*ary,1,2,3,4,5,6]` was parsed into an inefficient AST like `ary + [1,2] + [3,4] + [5,6]`. A patch from Anmol Chopra <anmolchopra@rocketbox.in>. Fixes [Bug #15018]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22compile.c: remove tracecoverage instruction for line coveragemame
Line coverage was based on special instruction "tracecoverage". Now, instead, it uses the mechanism of trace hook [Feature #14104]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22parse.y: remove coverage-related code fragmentsmame
The code fragments that initializes coverage data were scattered into both parse.y and compile.c. parse.y allocated a coverage data, and compile.c initialize the data. To remove this cross-cutting concern, this change moves the allocation from "coverage" function of parse.y to "rb_iseq_new_top" of iseq.c. For the sake, parse.y just counts the line number of the original source code, and the number is passed via rb_ast_body_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22node.h (rb_ast_t): move its field mark_ary to node_buffer_tmame
I want to add a new field to rb_ast_t whose size is restricted because it is an imemo. This change makes one room in rb_ast_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22prototizednobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22common.mk: update "make help" so that "make check" now runs test-specmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22thread.c (rb_reset_coverages): remove coverage counters from all ISeqsmame
When coverage measurement is enabled, the compiler makes each iseq have a reference to the counter array of coverage. Even after coverage measurement is disabled, the reference is kept. And, if coverage measurement is restarted, a coverage hook will increase the counter. This is completely meaningless; it brings just overhead. To remove this meaninglessness, this change removes all the reference when coverage measuement is stopped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22Avoid compiler depend errorkazu
ref r64492 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Run specs against 2.3.7 to ensure version guards are correctly addederegon
* See [Feature #15004]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Update to ruby/spec@dd828d6eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Update to ruby/mspec@269f9cderegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e