summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
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
2013-06-19* include/ruby/ruby.h (struct rb_data_type_struct), gc.c: addko1
rb_data_type_struct::flags. Now, this flags is passed at T_DATA object creation. You can specify FL_WB_PROTECTED on this flag. * iseq.c: making non-shady iseq objects. * class.c, compile.c, proc.c, vm.c: add WB for iseq objects. * vm_core.h, iseq.h: constify fields to detect WB insertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19gc.c: more infonobu
* gc.c (gc_mark_children): show more info for broken object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (garbage_collect_body): use FIX2INT for ruby_gc_stress.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (make_deferred): clear flags to T_ZOMBIE.ko1
* gc.c (slot_sweep_body): fix indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (rgengc_remember): fix output level.ko1
* gc.c (rgengc_rememberset_mark): fix to output clear count. (shady_object_count + clear_count = count of remembered objects) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (rgengc_remember): check T_NONE and T_ZOMBIEko1
if RGENGC_CHECK_MODE > 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (RGENGC_CHECK_MODE): add new check mode `3'.ko1
In this mode, show all references if there is a miss-corrected object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (gc_stress_set): add special option of GC.stress.ko1
`GC.stress=(flag)' accepts integer to control behavior of GC. See code for details. Of course, this feature is only for MRI. You can debug RGenGC (WB) using `GC.stress = 1'. Using this option, do minor marking at all possible places. GC::STRESS_MINOR_MARK = 1 and GC::STRESS_LAZY_SWEEP = 2 seem good to add. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 * gc.c (gc_profile_record_flag): reason seems like one-hot encoding.tarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c: Rename rb_mObSpace -> rb_mObjSpacezzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (gc_stat): add `generated_normal_object_count_types' forko1
RGENGC_PROFILE >= 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* gc.c (gc_mark_maybe): check to skip T_NONE.ko1
* gc.c (markable_object_p): do not need to check (flags == 0) here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* gc.c (gc_mark_children): don't need to care about T_ZOMBIE here.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* gc.c (ObjectSpace): is a module not a class.eregon
* ext/objspace/objspace.c: try to include overview in rdoc, see #8537. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* gc.c: fix example of ObjectSpace.define_finalizer in overvieweregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* gc.c (gc_mark_maybe): added. check `is_pointer_to_heap()' andko1
type is not T_ZOMBE. * gc.c: use `gc_mark_maybe()'. T_ZOMBIE objects should not be pushed to the mark stack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-15 * gc.c: Fixup around GC by MALLOC. tarui
Add allocate size to malloc_increase before GC for updating limit in after_gc_sweep. Reset malloc_increase into garbage_collect() for preventing GC again soon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-15 * gc.c : add some colums to more detail profile.tarui
new colums: Allocated size, Prepare Time, Removing Objects, Empty Objects git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-15 * gc.c (gc_prof_timer_stop): Merge function codes of GC_PROFILE_MORE_DETAIL ↵tarui
and !GC_PROFILE_MORE_DETAIL. * gc.c (gc_prof_mark_timer_start): Ditto. * gc.c (gc_prof_mark_timer_stop): Ditto. * gc.c (gc_prof_sweep_slot_timer_start): Ditto. * gc.c (gc_prof_sweep_slot_timer_stop): Ditto. * gc.c (gc_prof_set_malloc_info): Ditto. * gc.c (gc_prof_set_heap_info): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10* gc.c (rgengc_remember): permit promoted object.ko1
(rb_gc_writebarrier -> remember) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10* gc.c (RVALUE_PROMOTE): fix parameter name (`x' to `obj')ko1
and make it inline function (like RVALUE_PROMOTE). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10* gc.c (wmap_mark): check allocation of `w->obj2wmap'.ko1
(no-allocation `w->obj2wmap' will be NULL pointer reference) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07* internal.h (numberof): Gathered from various files.akr
* array.c, math.c, thread_pthread.c, iseq.c, enum.c, string.c, io.c, load.c, compile.c, struct.c, eval.c, gc.c, parse.y, process.c, error.c, ruby.c: Remove the definitions of numberof. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07* gc.c (before_gc_sweep): noinline can also avoid the segv instead ofnaruse
-O0 of r41084. this way is expected less slow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07adjust stylenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07* gc.c (gc_clear_slot_bits): used only if no RGenGC.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07 * gc.c: use oldgen bitmap as initial mark bitmap when mijor gc.tarui
so can skip oldgen bitmap check around mark & sweep. * gc.c (slot_sweep_body): change scan algorithm for performance: from object's pointer base to bitmap one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07 * gc.c: introduce oldgen bitmap for preparing performance tuning.tarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07 * gc.c (MARKED_IN_BITMAP, MARK_IN_BITMAP, CLEAR_IN_BITMAP): bringtarui
bitmap macros in one place, and introduce BITMAP_BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07* gc.c: remove "Sunny" terminology.ko1
"Sunny" doesn't mean antonym of "Shady" (questionable, doubtful, etc). Instead of "Suuny", use "non-shady" or "normal". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05 * gc.c (gc_mark): get rid of pushing useless objests.tarui
* gc.c (rgengc_rememberset_mark): bypass gc_mark() in order to push sunny old object at minor gc. * gc.c (gc_mark_children): move sunny old check to gc_mark(). * gc.c (rgengc_check_shady): remove DEMOTE that already unnecessary. * gc.c (rb_gc_writebarrier): ditto. change sunny old check point in order to save mark stack and remove unnatural rest_sweep & demote. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05 * gc.c (rgengc_rememberset_mark): change scan algorithm for performance:tarui
from object's pointer base to bitmap one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e