summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-11 18:03:43 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-11 18:03:43 +0000
commit9d70a17541782493c7cf5d0dceafadccc2424bd8 (patch)
tree746711090e8743e238e636cec88eab54064091cd /gc.c
parent3b0abede8ef1a89c4798be11c46922924e21484e (diff)
revert r43259 because it is possible to mark miss classes defined in C-exts. Thanks charliesome.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gc.c b/gc.c
index e4d8c1c9e1..2d489ac679 100644
--- a/gc.c
+++ b/gc.c
@@ -535,6 +535,7 @@ VALUE *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
int ruby_gc_debug_indent = 0;
VALUE rb_mGC;
+extern st_table *rb_class_tbl;
int ruby_disable_gc_stress = 0;
void rb_gcdebug_print_obj_condition(VALUE obj);
@@ -3452,7 +3453,7 @@ gc_mark_stacked_objects(rb_objspace_t *objspace)
shrink_stack_chunk_cache(mstack);
}
-#define RGENGC_PRINT_TICK 0
+#define RGENGC_PRINT_TICK 1
/* the following code is only for internal tuning. */
/* Source code to use RDTSC is quoted and modified from
@@ -3573,18 +3574,13 @@ gc_marks_body(rb_objspace_t *objspace, int full_mark)
th->vm->self ? rb_gc_mark(th->vm->self) : rb_vm_mark(th->vm);
MARK_CHECKPOINT;
- rb_gc_mark(rb_cObject);
+ mark_tbl(objspace, finalizer_table);
MARK_CHECKPOINT;
mark_current_machine_context(objspace, th);
MARK_CHECKPOINT;
- mark_tbl(objspace, finalizer_table);
-
- MARK_CHECKPOINT;
- objspace->rgengc.parent_object_is_promoted = TRUE;
rb_gc_mark_symbols(full_mark);
- objspace->rgengc.parent_object_is_promoted = FALSE;
MARK_CHECKPOINT;
rb_gc_mark_encodings();
@@ -3601,6 +3597,9 @@ gc_marks_body(rb_objspace_t *objspace, int full_mark)
MARK_CHECKPOINT;
rb_gc_mark_global_tbl();
+ MARK_CHECKPOINT;
+ mark_tbl(objspace, rb_class_tbl);
+
/* mark generic instance variables for special constants */
MARK_CHECKPOINT;
rb_mark_generic_ivar_tbl();