ruby-changes:30556
From: ko1 <ko1@a...>
Date: Wed, 21 Aug 2013 02:32:25 +0900 (JST)
Subject: [ruby-changes:30556] ko1:r42635 (trunk): * gc.c (rb_gcdebug_print_obj_condition): add printing information.
ko1 2013-08-21 02:32:18 +0900 (Wed, 21 Aug 2013) New Revision: 42635 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42635 Log: * gc.c (rb_gcdebug_print_obj_condition): add printing information. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42634) +++ ChangeLog (revision 42635) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Aug 21 02:30:15 2013 Koichi Sasada <ko1@a...> + + * gc.c (rb_gcdebug_print_obj_condition): add printing information. + Tue Aug 20 13:38:00 2013 Naohisa Goto <ngotogenome@g...> * test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. Index: gc.c =================================================================== --- gc.c (revision 42634) +++ gc.c (revision 42635) @@ -5655,6 +5655,8 @@ rb_gcdebug_print_obj_condition(VALUE obj https://github.com/ruby/ruby/blob/trunk/gc.c#L5655 { rb_objspace_t *objspace = &rb_objspace; + fprintf(stderr, "created at: %s:%d\n", RSTRING_PTR(RANY(obj)->file), FIX2INT(RANY(obj)->line)); + if (is_pointer_to_heap(objspace, (void *)obj)) { fprintf(stderr, "pointer to heap?: true\n"); } @@ -5662,12 +5664,17 @@ rb_gcdebug_print_obj_condition(VALUE obj https://github.com/ruby/ruby/blob/trunk/gc.c#L5664 fprintf(stderr, "pointer to heap?: false\n"); return; } - fprintf(stderr, "marked?: %s\n", - MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj) ? "true" : "false"); + + fprintf(stderr, "marked? : %s\n", MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj) ? "true" : "false"); +#if USE_RGENGC + fprintf(stderr, "promoted? : %s\n", RVALUE_PROMOTED(obj) ? "true" : "false"); + fprintf(stderr, "shady? : %s\n", RVALUE_SHADY(obj) ? "true" : "false"); + fprintf(stderr, "remembered?: %s\n", MARKED_IN_BITMAP(GET_HEAP_REMEMBERSET_BITS(obj), obj) ? "true" : "false"); +#endif + if (is_lazy_sweeping(objspace)) { fprintf(stderr, "lazy sweeping?: true\n"); - fprintf(stderr, "swept?: %s\n", - is_swept_object(objspace, obj) ? "done" : "not yet"); + fprintf(stderr, "swept?: %s\n", is_swept_object(objspace, obj) ? "done" : "not yet"); } else { fprintf(stderr, "lazy sweeping?: false\n"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/