* dir.c (glob_make_pattern): set PLAIN for non-magical path to
skip parts which not need to glob.
[ruby-core:61552] [Bug #9648]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c (glob_pattern_type): separate names with alphabet but no
magical from plain.
* dir.c (glob_helper): match plain names as-is to treat super-root
same as the root. [ruby-core:61552] [Bug #9648]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
at the major GC because AGE2Promotion changes all old objects into
young objects at major GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
heap_pages_increment.
For example, GC by exceeding malloc_limit can remain
heap_pages_increment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit/parallel.rb: fix test-all parallel failure if a test
is skipped after raise.
DL::TestFunc#test_sinf is skipped after raise on mingw ruby.
But it causes Mashal.load failure due to undefined class/module
DL::DLError when doing test-all parallel and test-all doesn't
complete. We create new MiniTest::Skip object to avoid Mashal.load
failure.
[ruby-core:62133] [Bug #9767]
* test/testunit/test_parallel.rb (TestParallel): add a test.
* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_win32.c (rb_w32_stack_overflow_handler): use Structured
Exception Handling by Addvectoredexceptionhandler() for machine
stack overflow on mingw.
This would be equivalent to the handling using __try and __exept
on mswin introduced by r43748.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/openssl/depend (ossl.o): now depends on thread_native.h
under $(hdrdir) instead of $(top_srcdir). [Feature #9612]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/make-snapshot (package): add -package option to select
packages to be made.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/make-snapshot (package): support xz. no longer runs with
1.8 or earlier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
on RGENGC_AGE2_PROMOTION.
* gc.c (RVALUE_PROMOTE_YOUNG): decrement young object count on
YOUNG->OLD.
* gc.c (obj_free): decrement young object count when young object
freed.
* gc.c (gc_marks): should not clear young object count.
* gc.c (gc_stat_internal): GC.stat :young_object information.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* signal.c (check_stack_overflow): check the next page too. SP in
ucontext is not decremented yet when `push` failed, so the fault
page can be the next.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_process.rb (test_status_kill): WIFEXITED and so
on are available only if signal is supported by the system.
[ruby-dev:48203] [Bug #9820]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
A doubly-linked list for tracking living threads guarantees
constant-time insert/delete performance with no corner cases of a
hash table. I chose this ccan implementation of doubly-linked
lists over the BSD sys/queue.h implementation since:
1) insertion and removal are both branchless
2) locality is improved if a struct may be a member of multiple lists
(0002 patch in Feature 9632 will introduce a secondary list
for waiting FDs)
This also increases cache locality during iteration: improving
performance in a new IO#close benchmark with many sleeping threads
while still scanning the same number of threads.
vm_thread_close 1.762
* vm_core.h (rb_vm_t): list_head and counter for living_threads
(rb_thread_t): vmlt_node for living_threads linkage
(rb_vm_living_threads_init): new function wrapper
(rb_vm_living_threads_insert): ditto
(rb_vm_living_threads_remove): ditto
* vm.c (rb_vm_living_threads_foreach): new function wrapper
* thread.c (terminate_i, thread_start_func_2, thread_create_core,
thread_fd_close_i, thread_fd_close): update to use new APIs
* vm.c (vm_mark_each_thread_func, rb_vm_mark, ruby_vm_destruct,
vm_memsize, vm_init2, Init_VM): ditto
* vm_trace.c (clear_trace_func_i, rb_clear_trace_func): ditto
* benchmark/bm_vm_thread_close.rb: added to show improvement
* ccan/build_assert/build_assert.h: added as a dependency of list.h
* ccan/check_type/check_type.h: ditto
* ccan/container_of/container_of.h: ditto
* ccan/licenses/BSD-MIT: ditto
* ccan/licenses/CC0: ditto
* ccan/str/str.h: ditto (stripped of unused macros)
* ccan/list/list.h: ditto
* common.mk: add CCAN_LIST_INCLUDES
[ruby-core:61871][Feature 9632 (part 1)]
Apologies for the size of this commit, but I think a good
doubly-linked list will be useful for future features, too.
This may be used to add ordering to a container_of-based hash
table to preserve compatibility if required (e.g. feature 9614).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (ruby_kill): always deliver signal immediately, without
check for main thread. no longer called in other context.
[ruby-dev:48203] [Bug #9820]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e