ruby-changes:29464
From: ko1 <ko1@a...>
Date: Fri, 21 Jun 2013 11:20:21 +0900 (JST)
Subject: [ruby-changes:29464] ko1:r41516 (trunk): * gc.c (gc_marks_body): fix to get `th' in this function.
ko1 2013-06-21 11:20:10 +0900 (Fri, 21 Jun 2013) New Revision: 41516 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41516 Log: * gc.c (gc_marks_body): fix to get `th' in this function. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 41515) +++ ChangeLog (revision 41516) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jun 21 11:18:25 2013 Koichi Sasada <ko1@a...> + + * gc.c (gc_marks_body): fix to get `th' in this function. + Fri Jun 21 10:21:44 2013 Koichi Sasada <ko1@a...> * gc.c (heaps_header/heaps_slot): embed bitmaps into heaps_slot. Index: gc.c =================================================================== --- gc.c (revision 41515) +++ gc.c (revision 41516) @@ -3416,9 +3416,10 @@ gc_mark_stacked_objects(rb_objspace_t *o https://github.com/ruby/ruby/blob/trunk/gc.c#L3416 } static void -gc_marks_body(rb_objspace_t *objspace, rb_thread_t *th, int minor_gc) +gc_marks_body(rb_objspace_t *objspace, int minor_gc) { struct gc_list *list; + rb_thread_t *th = GET_THREAD(); /* start marking */ rgengc_report(1, objspace, "gc_marks_body: start (%s)\n", minor_gc ? "minor" : "major"); @@ -3546,7 +3547,7 @@ gc_free_stored_bitmaps(rb_objspace_t *ob https://github.com/ruby/ruby/blob/trunk/gc.c#L3547 } static void -gc_marks_test(rb_objspace_t *objspace, rb_thread_t *th, bits_t *before_stored_bitmaps) +gc_marks_test(rb_objspace_t *objspace, bits_t *before_stored_bitmaps) { bits_t *stored_bitmaps = gc_store_bitmaps(objspace); size_t i; @@ -3554,7 +3555,7 @@ gc_marks_test(rb_objspace_t *objspace, r https://github.com/ruby/ruby/blob/trunk/gc.c#L3555 rgengc_report(1, objspace, "gc_marks_test: test-full-gc\n"); /* run major (full) gc with temporary mark/rememberset */ - gc_marks_body(objspace, th, FALSE); + gc_marks_body(objspace, FALSE); objspace->rgengc.during_minor_gc = TRUE; /* check */ @@ -3577,11 +3578,11 @@ gc_marks_test(rb_objspace_t *objspace, r https://github.com/ruby/ruby/blob/trunk/gc.c#L3578 if (objspace->rgengc.interesting_object) { fprintf(stderr, "!!! restart minor gc\n"); gc_restore_bitmaps(objspace, before_stored_bitmaps); - gc_marks_body(objspace, th, FALSE); + gc_marks_body(objspace, FALSE); fprintf(stderr, "!!! restart major gc\n"); gc_restore_bitmaps(objspace, before_stored_bitmaps); - gc_marks_body(objspace, th, TRUE); + gc_marks_body(objspace, TRUE); rb_bug("gc_marks_test (again): %p (%s) is living, but not marked && not promoted.\n", (void *)objspace->rgengc.interesting_object, obj_type_name((VALUE)objspace->rgengc.interesting_object)); } @@ -3596,7 +3597,6 @@ static void https://github.com/ruby/ruby/blob/trunk/gc.c#L3597 gc_marks(rb_objspace_t *objspace, int minor_gc) { struct mark_func_data_struct *prev_mark_func_data; - rb_thread_t *th = GET_THREAD(); gc_prof_mark_timer_start(objspace); { @@ -3609,7 +3609,7 @@ gc_marks(rb_objspace_t *objspace, int mi https://github.com/ruby/ruby/blob/trunk/gc.c#L3609 objspace->rgengc.remembered_shady_object_count = 0; objspace->rgengc.oldgen_object_count = 0; - gc_marks_body(objspace, th, FALSE); + gc_marks_body(objspace, FALSE); /* Do full GC if old/remembered_shady object counts is greater than counts two times at last full GC counts */ objspace->rgengc.remembered_shady_object_limit = objspace->rgengc.remembered_shady_object_count * 2; @@ -3618,16 +3618,16 @@ gc_marks(rb_objspace_t *objspace, int mi https://github.com/ruby/ruby/blob/trunk/gc.c#L3618 else { /* minor GC */ if (RGENGC_CHECK_MODE > 1) { bits_t *before_mark_stored_bitmaps = gc_store_bitmaps(objspace); - gc_marks_body(objspace, th, TRUE); - gc_marks_test(objspace, th, before_mark_stored_bitmaps); + gc_marks_body(objspace, TRUE); + gc_marks_test(objspace, before_mark_stored_bitmaps); gc_free_stored_bitmaps(objspace, before_mark_stored_bitmaps); } else { - gc_marks_body(objspace, th, TRUE); + gc_marks_body(objspace, TRUE); } } #else /* USE_RGENGC */ - gc_marks_body(objspace, th, FALSE); + gc_marks_body(objspace, FALSE); #endif objspace->mark_func_data = prev_mark_func_data; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/