summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-11-06* benchmark/bm_vm1_gc_short_lived.rb: added.ko1
These GC benchmarks do not reflect practical applications. They are only for tuning. * benchmark/bm_vm1_gc_short_with_complex_long.rb: added. * benchmark/bm_vm1_gc_short_with_long.rb: added. * benchmark/bm_vm1_gc_short_with_symbol.rb: added. * benchmark/bm_vm1_gc_wb_ary.rb: added. * benchmark/bm_vm1_gc_wb_obj.rb: added. * benchmark/bm_vm_thread_queue.rb: added. Thie benchmark is added to know how fast C verion of thread.so. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06* gc.c: define RGENGC_ESTIMATE_OLDSPACE == 0 if USE_RGENGC is 0.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* benchmark/gc/gcbench.rb: fix typo of r43543eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* gc.c (Init_GC): add GC::OPTS to show options.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* benchmark/gc/gcbench.rb: add some options to make quiet.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* 2013-11-06svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* ext/psych/lib/psych/visitors/to_ruby.rb: process merge keys beforetenderlove
reviving objects. Fixes GH psych #168 * test/psych/test_merge_keys.rb: test for change https://github.com/tenderlove/psych/issues/168 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* test/ruby/test_thread.rb (test_thread_join_in_trap):akr
Run the test in a different process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 * gc.c (is_live_object): A hidden object may be a live object.tarui
[ruby-dev:47788] [Bug #9072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05pty.c: check error of seteuidnobu
* ext/pty/pty.c (chfunc): check error of seteuid and return error message, to suppress unused-value warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05test_command_processor.rb: clear tmpdirnobu
* test/shell/test_command_processor.rb (TestShell#teardown): should not leave temporary directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05eval_intern.h: rename prefixnobu
* eval_intern.h (rb_threadptr_tag_state, rb_threadptr_tag_jump): rename prefix ruby as rb, same as other rb_threadptr functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05eval.c: suppress warningnobu
* eval.c (rb_protect): get rid of false clobbered warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05fix typos in ChangeLog.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* gc.c: add support to estimate increase of oldspace memory usage.ko1
This is another approach to solve an issue discussed at r43530. This feature is diabled as default. This feature measures an increment of memory consuption by oldgen objects. It measures memory consumption for each objects when the object is promoted. However, measurement of memory consumption is not accurate now. So that this measurement is `estimation'. To implement this feature, move memsize_of() function from ext/objspace/objspace.c and expose rb_obj_memsize_of(). Some memsize() functions for T_DATA (T_TYPEDDATA) have problem to measure memory size, so that we ignores T_DATA objects now. For example, some functions skip NULL check for pointer. The macro RGENGC_ESTIMATE_OLDSPACE enables/disables this feature, and turned off as default. We need to compare 3gen GC and this feature carefully. (it is possible to enable both feature) We need a help to compare them. * internal.h: expose rb_obj_memsize_of(). * ext/objspace/objspace.c: use rb_obj_memsize_of() function. * cont.c (fiber_memsize): fix to check NULL. * variable.c (autoload_memsize): ditto. * vm.c (vm_memsize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04* gc.c (GC_MALLOC_LIMIT_MAX): fix default value 512MB -> 384MB.ko1
512MB is huge. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04* gc.c: add 3gen GC patch, but disabled as default.ko1
RGenGC is designed as 2 generational GC, young and old generation. Young objects will be promoted to old objects after one GC. Old objects are not collect until major (full) GC. The issue of this approach is some objects can promoted as old objects accidentally and not freed until major GC. Major GC is not frequently so short-lived but accidentally becoming old objects are not freed. For example, the program "loop{Array.new(1_000_000)}" consumes huge memories because short lived objects (an array which has 1M elements) are promoted while GC and they are not freed before major GC. To solve this problem, generational GC with more generations technique is known. This patch implements three generations gen GC. At first, newly created objects are "Infant" objects. After surviving one GC, "Infant" objects are promoted to "Young" objects. "Young" objects are promoted to "Old" objects after surviving next GC. "Infant" and "Young" objects are collected if it is not marked while minor GC. So that this technique solves this problem. Representation of generations: * Infant: !FL_PROMOTED and !oldgen_bitmap [00] * Young : FL_PROMOTED and !oldgen_bitmap [10] * Old : FL_PROMOTED and oldgen_bitmap [11] The macro "RGENGC_THREEGEN" enables/disables this feature, and turned off as default because there are several problems. (1) Failed sometimes (Heisenbugs). (2) Performance down. Especially on write barriers. We need to detect Young or Old object by oldgen_bitmap. It is slower than checking flags. To evaluate this feature on more applications, I commit this patch. Reports are very welcome. This patch includes some refactoring (renaming names, etc). * include/ruby/ruby.h: catch up 3gen GC. * .gdbinit: fix to show a prompt "[PROMOTED]" for promoted objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04* node.h: catch up comments for last commit.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04* 2013-11-05svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04* include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.ko1
This flag represents that "this object is promoted at least once." * gc.c, debug.c, object.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04* test/xmlrpc: Don't use fixed ports: 8070 and 8071.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04fix a typokazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04* test/xmlrpc/webrick_testing.rb (start_server): Initialize the serverakr
at main thread to fail early. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04* 2013-11-04svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04eval_intern.h: avoid undefined behavior of setjmpnobu
* eval_intern.h (TH_EXEC_TAG, TH_JUMP_TAG): get rid of undefined behavior of setjmp() in rhs of assignment expression. [ISO/IEC 9899:1999] 7.13.1.1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03* sample/test.rb: Make temporary file names unique.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03gc.c: use booleannobu
* gc.c (obj_free): use free_immediately as boolean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03ifchange: no overwrite with an empty filenobu
* tool/ifchange, win32/ifchange.bat: do not overwrite with an empty file by default, and add --empty option to force it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03* test/xmlrpc: Wrap definitions by TestXMLRPC module.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03* test/xmlrpc/webrick_testing.rb (stop_server): Don't try to shutdownakr
the server if the server is not started. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03gc.c: suppress warningnobu
* gc.c (obj_free): suppress a false shorten-64-to-32 warning, RUBY_TYPED_FREE_IMMEDIATELY never exceed the limit of int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03* 2013-11-03svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03load.c: defer initalization of static-linked-extnobu
* load.c (rb_feature_p): deal with default loadable suffixes. * load.c (load_lock): initialize statically linked extensions. * load.c (search_required, rb_require_safe): deal with statically linked extensions. * load.c (ruby_init_ext): defer initalization of statically linked extensions until required actually. [Bug #8883] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-02logger.rb: fix r43511 for Windowsnobu
* lib/logger.rb (Logger::LogDevice::LogDeviceMutex#lock_shift_log): open file can't be removed or renamed on Windows. [ruby-dev:47790] [Bug #9046] * test/logger/test_logger.rb (TestLogDevice#run_children): don't use fork. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01* 2013-11-02svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01* lib/logger.rb: Inter-process locking for log rotationnaruse
Current implementation fails log rotation on multi process env. by sonots <sonots@gmail.com> https://github.com/ruby/ruby/pull/428 fix GH-428 [Bug #9046] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01fix typotarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01gc.c: mark live objects onlynobu
* gc.c (wmap_mark_map): mark live objects only, but delete zombies. [ruby-dev:47787] [Bug #9069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01 * gc.c (struct heap_page, gc_page_sweep, gc_sweep): Refactoring fortarui
performance. Add before_sweep condition to heap_page structure. * gc.c (rb_gc_force_recycle): Use before_sweep member. * gc.c (heap_is_before_sweep, is_before_sweep): Remove. They has not already been used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01test_m17n.rb: fix encodingnobu
* test/ruby/test_m17n.rb (test_scrub): fix expected encoding, for non-UTF-8 environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01 * gc.c (make_deferred): Refactoring. Collect codes which should betarui
atomic. * gc.c (make_io_deferred, obj_free, rb_objspace_call_finalizer, gc_page_sweep): Correspond to the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01 * gc.c (typedef struct rb_objspace): Refactoring. Move some memberstarui
into profile member. * gc.c (newobj_of): Correspond to the above. * gc.c (finalize_list): Ditto. * gc.c (objspace_live_num): Ditto. * gc.c (gc_page_sweep): Ditto. * gc.c (rb_gc_force_recycle): Ditto. * gc.c (garbage_collect_body): Ditto. * gc.c (rb_gc_count): Ditto. * gc.c (gc_stat): Ditto. * gc.c (gc_prof_set_heap_info): Ditto. * gc.c (gc_profile_dump_on): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01transcode.c: fix segv in String.encode!nobu
* transcode.c (str_transcode0): fix segv in String.encode!. now rb_str_scrub() can return nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01string.c: fix typonobu
* string.c (rb_str_scrub): fix typo, should yield invalid byte sequence to be scrubbed. reported by znz at IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01gc.c: zombie is not alivenobu
* gc.c (is_live_object): finalizer may not run because of lazy-sweep. [ruby-dev:47786] [Bug #9069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01test_m17n.rb: nil replacementnobu
* test/ruby/test_m17n.rb (test_scrub, test_scrub_bang): now explicit nil is allowed as replacement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01string.c: export rb_str_scrubnobu
* string.c (rb_str_scrub): export with fixed length arguments, and allow nil as replacement string instead of omitting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01load.c: suppress warningnobu
* load.c (rb_load_internal): split to suppress false "clobbered" warning by gcc 4.4.5. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01load.c: use local variablenobu
* load.c (rb_load_internal): use local variable th instead of GET_THREAD() for each time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e