[前][次][番号順一覧][スレッド一覧]

ruby-changes:37944

From: ko1 <ko1@a...>
Date: Thu, 19 Mar 2015 16:16:37 +0900 (JST)
Subject: [ruby-changes:37944] ko1:r50025 (trunk): * gc.c (obj_info): show allocation site if GC_DEBUG is not 0.

ko1	2015-03-19 16:16:27 +0900 (Thu, 19 Mar 2015)

  New Revision: 50025

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50025

  Log:
    * gc.c (obj_info): show allocation site if GC_DEBUG is not 0.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50024)
+++ ChangeLog	(revision 50025)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Mar 19 16:15:24 2015  Koichi Sasada  <ko1@a...>
+
+	* gc.c (obj_info): show allocation site if GC_DEBUG is not 0.
+
 Thu Mar 19 16:12:01 2015  Koichi Sasada  <ko1@a...>
 
 	* gc.c (newobj_of): fix RGENGC_OLD_NEWOBJ_CHECK logics.
Index: gc.c
===================================================================
--- gc.c	(revision 50024)
+++ gc.c	(revision 50025)
@@ -8812,6 +8812,10 @@ obj_info(VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L8812
 	     C(RVALUE_WB_UNPROTECTED_BITMAP(obj), "U"),
 	     obj_type_name(obj));
 
+#if GC_DEBUG
+    snprintf(buff, OBJ_INFO_BUFFERS_SIZE, "%s @%s:%d", buff, RANY(obj)->file, RANY(obj)->line);
+#endif
+
 #ifdef HAVE_VA_ARGS_MACRO
     switch (BUILTIN_TYPE(obj)) {
       case T_NODE:

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]