1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2013-08-20 17:32:18 +00:00
parent 4d0fd22e7d
commit 326bf140b4
2 changed files with 15 additions and 4 deletions

View file

@ -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.

15
gc.c
View file

@ -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");