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

ruby-changes:32143

From: ko1 <ko1@a...>
Date: Sun, 15 Dec 2013 13:42:30 +0900 (JST)
Subject: [ruby-changes:32143] ko1:r44222 (trunk): * ext/objspace/objspace.c (reachable_object_from_root_i):

ko1	2013-12-15 13:42:23 +0900 (Sun, 15 Dec 2013)

  New Revision: 44222

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

  Log:
    * ext/objspace/objspace.c (reachable_object_from_root_i):
      reachable objects should not include categories and
      category_objects because it is noisy information.
      In fact, objects created after calling
      ObjectSpace.reachable_objects_from_root should not be included
      as a returning hash objects. Currently, mswin64 platform has a
      problem because of this behaviour. Should we trace new objects?

  Modified files:
    trunk/ChangeLog
    trunk/ext/objspace/objspace.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44221)
+++ ChangeLog	(revision 44222)
@@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Dec 15 13:38:29 2013  Koichi Sasada  <ko1@a...>
+
+	* ext/objspace/objspace.c (reachable_object_from_root_i):
+	  reachable objects should not include categories and
+	  category_objects because it is noisy information.
+
+	  In fact, objects created after calling
+	  ObjectSpace.reachable_objects_from_root should not be included
+	  as a returning hash objects. Currently, mswin64 platform has a
+	  problem because of this behaviour. Should we trace new objects?
+
 Sun Dec 15 07:09:28 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rdoc:  Update to RDoc master 263a9e5.  This improves the
Index: ext/objspace/objspace.c
===================================================================
--- ext/objspace/objspace.c	(revision 44221)
+++ ext/objspace/objspace.c	(revision 44222)
@@ -679,7 +679,9 @@ reachable_object_from_root_i(const char https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L679
 	rb_hash_aset(data->categories, category_str, category_objects);
     }
 
-    if (rb_objspace_markable_object_p(obj)) {
+    if (rb_objspace_markable_object_p(obj) &&
+	obj != data->categories &&
+	obj != data->last_category_objects) {
 	if (rb_objspace_internal_object_p(obj)) {
 	    obj = iow_newobj(obj);
 	}

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

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