diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-20 17:32:18 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-20 17:32:18 +0000 |
commit | 326bf140b4c5b6c9858a0bddd9122c4f691af2cb (patch) | |
tree | 3c61f0cdfa0f5c2fd5dfabf3086d25dc18c97aa3 | |
parent | 4d0fd22e7dc2b508d56cbd537f2f910e178575ef (diff) | |
download | ruby-326bf140b4c5b6c9858a0bddd9122c4f691af2cb.tar.gz |
* gc.c (rb_gcdebug_print_obj_condition): add printing information.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 15 |
2 files changed, 15 insertions, 4 deletions
@@ -1,3 +1,7 @@ +Wed Aug 21 02:30:15 2013 Koichi Sasada <ko1@atdot.net> + + * gc.c (rb_gcdebug_print_obj_condition): add printing information. + Tue Aug 20 13:38:00 2013 Naohisa Goto <ngotogenome@gmail.com> * test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. @@ -5655,6 +5655,8 @@ rb_gcdebug_print_obj_condition(VALUE obj) { 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) 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"); |