summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2013-06-26* gc.c (is_before_sweep): Add a missing space before a parenthesis.kou
* gc.c (rb_gc_force_recycle): Add a missing space around a parenthesis. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-25 * gc.c (is_before_sweep): Add new helper function that check the objecttarui
is before sweep? * gc.c (rb_gc_force_recycle): Have to clear mark bit if object's slot already ready to mainor sweep. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-25* gc.c: fix oldgen/remembered_shady counting algorithm.ko1
* gc.c (rgengc_check_shady): increment `objspace->rgengc.remembered_shady_object_count' here. * gc.c (rgengc_remember): return FALSE if obj is already remembered. * gc.c (rgengc_rememberset_mark): make it void. * gc.c (gc_mark_children): fix to double counting oldgen_object_count at minor GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-24* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-24 * gc.c (typedef struct rb_objspace): Change members for monitor objects.tarui
* gc.c (gc_marks_test): Check all WriteBarrier Errors and track them in obj-tree. * gc.c (rgengc_check_shady): Ditto. * gc.c (gc_marks): Move 2 funtion calls to gc_marks_test for test initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-23* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-23 * gc.c (after_gc_sweep): Have to record malloc info before reset.tarui
* gc.c (gc_prof_timer_start): Pick out part of new record creation as gc_prof_setup_new_record. * gc.c (gc_prof_set_malloc_info): Move point of recording allocation size to front of mark. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* include/ruby/ruby.h, gc.c: rename macros and functions:ko1
OBJ_WB_GIVEUP() -> OBJ_WB_UNPROTECT(), rb_obj_wb_giveup() -> rb_obj_wb_unprotect(), rb_gc_giveup_promoted_writebarrier() -> rb_gc_writebarrier_unprotect_promoted(), * class.c, eval.c, hash.c: use OBJ_WB_UNPROTECT(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* gc.c (rgengc_check_shady): add new WB miss checkingko1
on RGENGC_CHECK_MODE >= 2. (1) Save bitmaps before marking (2) Run full marking (3) On each traceable object, (a) object was not oldgen (== newly or shady object) && (b) parent object was oldgen && (c) parent object was not remembered && (d) object was not rememberd then, it should be WB miss. This idea of this checker is by Masaya Tarui <tarui@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (gc_prof_set_heap_info, after_gc_sweep): callko1
gc_prof_set_heap_info() just after sweeping to calculate live object number correctly. (live object number = total generated number (before marking) - total freed number (after sweeping)) * gc.c (gc_marks): record `oldgen_object_count' into current profile` record directly. * gc.c (rgengc_rememberset_mark): same for remembered_normal_objects and remembered_shady_objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (rb_objspace::profile): rename rb_objspace::profile::record toko1
records (because it points a set of records) and add a field rb_objspace::profile::current_record to point a current profiling record. * gc.c: use above fields. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (rb_gc_giveup_promoted_writebarrier): remove `rest_sweep()'ko1
because all of remembered objects are called for gc_mark_children(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (rgengc_rememberset_mark): call gc_mark_children() forko1
remembered objects directly instead of pushing on the mark stack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (slot_sweep_body): rename to slot_sweep().ko1
No need to separate major/minor GC. * gc.c (gc_setup_mark_bits): remove gc_clear_mark_bits() and unify to this function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (check_bitmap_consistency): add to check flag and bitmap consistency.ko1
Use this function in several places. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21 * gc.c (typedef enum): Introdule flags of major gc reason.tarui
* gc.c (garbage_collect_body): Ditto. * gc.c (gc_profile_flags): Ditto. * gc.c (gc_profile_dump_on): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (allocate_sorted_heaps): remove unused variable `add'.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* include/ruby/ruby.h: constify RArray::as::ary and RArray::heap::ptr.ko1
Use RARRAY_ASET() or RARRAY_PTR_USE() to modify Array objects. * array.c, gc.c: catch up above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* include/ruby/ruby.h: support write barrier protection for T_STRUCT.ko1
Introduce the following C APIs: * RSTRUCT_RAWPTR(st) returns pointer (do WB on your risk). The type of returned pointer is (const VALUE *). * RSTRUCT_GET(st, idx) returns idx-th value of struct. * RSTRUCT_SET(st, idx, v) set idx-th value by v with WB. And * RSTRUCT_PTR(st) returns pointer with shady operation. The type of returned pointer is (VALUE *). * struct.c, re.c, gc.c, marshal.c: rewrite with above APIs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (gc_sweep): profile sweep time correctly when LAZY_SWEEP isko1
disabled. * gc.c (gc_marks_test): store oldgen count and shady count before test marking and restore them after marking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c: enable lazy sweep (commit miss).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21revert last commit (operation miss).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c: fix to use total_allocated_object_num and heaps_usedko1
at the GC time for profiler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c: fix to use total_allocated_object_num and heaps_usedko1
at the GC time for profiler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c: RGENGC_CHECK_MODE should be 0.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (gc_marks_body): fix to get `th' in this function.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (heaps_header/heaps_slot): embed bitmaps into heaps_slot.ko1
no need to maintain allocation/free bitmaps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* gc.c (slot_sweep_body): add counters at a time.ko1
* gc.c (gc_profile_dump_on): fix line break position. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 * gc.c: refactoring bitmaps. introduce bits_t type and some Consts.tarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20* gc.c: fix to support USE_RGENGC == 0 (disable RGenGC).ko1
If USE_RGENGC==0, it caused compilation error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 * gc.c (lazy_sweep): Use is_lazy_sweeping()tarui
* gc.c (rest_sweep): Ditto. * gc.c (gc_prepare_free_objects): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20* gc.c (gc_profile_record::oldgen_objects): added.ko1
* gc.c (gc_profile_dump_on): print the following infomation: * Living object counts * Free object counts If RGENGC_PROFILE > 0 then * Oldgen object counts * Remembered normal object counts * Remembered shady object counts git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20* gc.c (gc_prof_sweep_timer_stop): accumulate sweep time only whenko1
record->gc_time > 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20* gc.c (rgengc_rememberset_mark): recordko1
(1) normal objects count in remember set (2) shady objects count in remember set each GC timing. * gc.c (gc_profile_record_get): enable to access above information and REMOVING_OBJECTS, EMPTY_OBJECTS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20gc.c: adjust indentnobu
* gc.c (gc_marks): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 * gc.c (rb_gc_writebarrier): give up rescan A and register B directlytarui
if A has huge number of children. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (gc_profile_total_time): check objspace->profile.next_index > 0.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (gc_prof_sweep_timer_start): fix merge miss.ko1
* gc.c (GC_PROFILE_MORE_DETAIL): set it 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c: Accumulate sweep time to GC time.ko1
Now [GC time] is [mark time] + [sweep time] + [misc]. ([GC time] >= [mark time] + [sweep time]) * gc.c (gc_prof_sweep_slot_timer_start/stop): rename to gc_prof_sweep_timer_start/stop and locate at lazy_sweep(). * gc.c (elapsed_time_from): add a utility function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (gc_marks): fix wrong option. FALSE means major/full GC.ko1
It should be TRUE (minor marking). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19gc.c: refine macrosnobu
* gc.c (MARKED_IN_BITMAP, FL_TEST2): return boolean value since always used as boolean value. * gc.c (MARK_IN_BITMAP, CLEAR_IN_BITMAP): evaluate bits once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19gc.c: gc_stress is a VALUEnobu
* gc.c (ruby_initial_gc_stress_ptr): now gc_stress is a VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (gc_free_stored_bitmaps): fix indent.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (RVALUE_PROMOTED): fix type.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (garbage_collect_test): rewrite checking code.ko1
When RGENGC_CHECK_MODE >= 2, all minor marking, run normal minor marking *and* major/full marking. After that, compare the results and shows BUG if a object living with major/full marking but dead with minor marking. After detecting bugs, print references information. (RGENGC_CHECK_MODE == 2, show references to dead object) (RGENGC_CHECK_MODE == 3, show all references) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (RVALUE_PROMOTED): check consistency between oldgen flag andko1
oldgen bitmap if RGENGC_CHECK_MODE > 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (rb_gc_force_recycle): clear oldgen bitmap, too.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* gc.c (gc_stress_get): GC.stress can be Fixnum.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e