summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2013-12-21* gc.c (ruby_gc_set_params): don't show obsolete warnings forko1
RUBY_FREE_MIN/RUBY_HEAP_MIN_SLOTS if RUBY_GC_HEAP_FREE_SLOTS/RUBY_GC_HEAP_INIT_SLOTS are given. [Bug #9276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19* gc.c (heap_get_freeobj): improve hot path performance.ko1
* gc.c (heap_get_freeobj_from_next_freepage): replace with heap_get_freepage(). It returns freeobj instead of freepage. This is not on hot path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19* gc.c (newobj_of): don't need to RBASIC_SET_CLASS() which includes WBko1
here because created obj is always YOUNG/INFANT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18gc.c: remove redundant freelist assignmenttmm1
* gc.c (heap_get_freeobj): remove redundant assignment. heap->freelist is set after the while() loop already. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* gc.c (garbage_collect_body): lazy_sweep setting should workko1
without USE_RGENGC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* gc.c (gc_profile_dump_major_reason): fix this function because major_reasonko1
can be OR of multiple reasons. * gc.c (gc_profile_dump_on): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* gc.c (gc_profile_record_get): should return an empty arrayko1
when profiling is active. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* gc.c (gc_profile_clear, gc_profile_enable): remove rest_sweep().ko1
* gc.c: check objspace->profile.current_record before inserting profiling record by new macro gc_prof_enabled(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17gc.c: prototypenobu
* gc.c (gc_finalize_deferred_register): define in prototype style, instead of old K&R style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (rb_objspace_markable_object_p): should check special_const_pko1
first (by is_markable_object()). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (gc_verify_internal_consistency): should not useko1
rb_objspace_each_objects() because it call rest_sweep(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (rb_objspace_markable_object_p): fix last commit (build error).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (rb_objspace_markable_object_p): it should be live objects.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c (rb_objspace_each_objects): should not clear dont_lazy_sweepko1
flag in nested case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c: use gc_verify_internal_consistency() instead ofko1
gc_check_before_marks_i() for check consistency on RGENGC_CHECK_MODE >= 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c: introduce GC.verify_internal_consistency method to verify GCko1
internal data structure. Now this method only checks geneartion (old/young) consistency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16gc.c: fix build with RGENGC_ESTIMATE_OLDMALLOC=0tmm1
* gc.c (gc_info_decode): Fix build errors wheb compiled with RGENGC_ESTIMATE_OLDMALLOC=0 * gc.c (objspace_malloc_increase): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 * gc.c (wmap_final_func): Bugfix. Should update *value to new pointer.tarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13gc.c: GC.latest_gc_info reports most interesting major_by flagtmm1
* gc.c (gc_info_decode): Use :major_by=>:nofree as fallback reason when other trigger conditions are present. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13* gc.c (garbage_collect_body): use rb_bug() and explicit error messageko1
instead of using assert(). [Bug #9222] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13* gc.c: rename *shady* func/macros.ko1
* RVALUE_RAW_SHADY() -> RVALUE_WB_PROTECTED_RAW() * RVALUE_SHADY() -> RVALUE_RAW_SHADY() * rgengc_check_shady() -> rgengc_check_relation(). And fix some messages using "shady" to "non-WB-protected". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12gc.c: no deletion in wmap_marknobu
* gc.c (wmap_mark): disable deletion of dead objects by default, so that WeakMap can be non-shady. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12gc.c: fix typo (RVALUE_OLDEGN_BITMAP -> RVALUE_OLDGEN_BITMAP)tmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12gc.c: live keys onlynobu
* gc.c (wmap_keys): return keys for live objects only, like as wmap_values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10gc.c: simple array for wmapnobu
* gc.c (wmap_finalize, wmap_aset_update): use simple malloced array instead of T_ARRAY, to reduce GC pressure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10gc.c: use st_updatenobu
* gc.c (wmap_aset): use st_update instead of st_lookup and st_insert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10gc.c: ruby_sized_xrealloc2nobu
* gc.c (ruby_sized_xrealloc2): reallocate from old size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10gc.c: speed up RGENGC_CHECK_MODE by removing unncessary checktmm1
* gc.c (reflist_add): revert changes from r44109. it is unnecessary after r44113 * gc.c (allrefs_i): fix whitespace * gc.c (allrefs_roots_i): fix whitespace git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10* gc.c (allrefs_add): push obj only if allrefs table doesn't haveko1
obj. * gc.c (allrefs_roots_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10* gc.c (RGENGC_CHECK_MODE): separate checkers to different modes.ko1
* 2: enable generational bits check (for debugging) * 3: enable livness check * 4: show all references git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10* gc.c (gc_marks_check): disable GC during checking andko1
restore malloc_increase info. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10gc.c: build complete object graph for RGENGC_CHECK_MODEtmm1
* gc.c (reflist_add): return 0 if reference already exists * gc.c (allrefs_add): return 1 on newly added references * gc.c (allrefs_i): follow references to construct complete object graph. before this patch, RGENGC_CHECK could fail to verify some WB miss issues. [Bug #9226] [ruby-core:58959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10gc.c: check arguments firstnobu
* gc.c (wmap_aset): check if both arguments are able to finalize before setting finalizers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10gc.c: fix WeakMap#inspectnobu
* gc.c (wmap_inspect_i): fix key/value order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10gc.c: fix typo in function nametmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10objspace_dump.c: include object's gc flags in dumptmm1
* ext/objspace/objspace_dump.c (dump_object): include fstring flag on strings. include gc flags (old, remembered, wb_protected) on all objects. * ext/objspace/objspace_dump.c (Init_objspace_dump): initialize lazy IDs before first use. * gc.c (rb_obj_gc_flags): new function to retrieve object flags * internal.h (RB_OBJ_GC_FLAGS_MAX): maximum flags allowed for one obj * test/objspace/test_objspace.rb (test_dump_flags): test for above * test/objspace/test_objspace.rb (test_trace_object_allocations): resolve name before dump (for rb_class_path_cached) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09gc.c: ObjectSpace::WeakMap#sizenobu
* gc.c (wmap_size): add ObjectSpace::WeakMap#size and #length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08gc.c: promote long-lived NODE_CREF objects to oldgentmm1
* include/ruby/ruby.h: add RGENGC_WB_PROTECTED_NODE_CREF setting In a large app, this reduces the size of remembered_shady_object_count by 80%. [Bug #9225] [ruby-core:58947] * gc.c (rb_node_newnode): add FL_WB_PROTECTED flag to NODE_CREF * class.c (rewrite_cref_stack): insert OBJ_WRITE for NODE_CREF * iseq.c (set_relation): ditto * iseq.c (rb_iseq_clone): ditto * vm_eval.c (rb_yield_refine_block): ditto * vm_insnhelper.c (vm_cref_push): ditto * vm_insnhelper.h (COPY_CREF): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07* gc.c (gc_mark_children): use nd_clss and nd_next for code claritycharliesome
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* gc.c: change oldmalloc meaning.ko1
Increase oldmalloc_increase with malloc_increase instead of using obj_memsize_of(). This change will avoid the danger of memory full without major GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* gc.c (atomic_sub_nounderflow): not 0 but val itself.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* gc.c (rb_objspace_alloc, Init_heap): initializeko1
oldmalloc_increase_limit at Init_heap. rb_objspace_alloc() is not called on some platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* gc.c (garbage_collect_body): bug fix.ko1
initialize after recording. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* gc.c (atomic_sub_nounderflow): added to simplify atomic sub withko1
care about underflow. * gc.c (objspace_malloc_increase): use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06vm_insnhelper.c: rb_get_kwargsnobu
* vm_insnhelper.c (rb_get_kwargs): get keyword argument values from an option hash, not only checking keys. * dir.c (dir_initialize): use rb_get_kwargs. * gc.c (gc_start_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06gc.c: indentnobu
* gc.c (gc_start_internal): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* gc.c (gc_start_internal): do not use rb_gc_start() and rb_gc().ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* gc.c (gc_start_internal, rb_gc): do not needko1
heap_pages_free_unused_pages() here. It was done in after_sweep(). * gc.c (rb_gc): The reason is now GPR_FLAG_CAPI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06gc.c: add note about experimental nature of new GC.start flagstmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e