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

ruby-changes:33861

From: ko1 <ko1@a...>
Date: Wed, 14 May 2014 18:03:29 +0900 (JST)
Subject: [ruby-changes:33861] ko1:r45942 (trunk): * gc.c (rgengc_rememberset_mark): promote remembered object earlier.

ko1	2014-05-14 18:03:17 +0900 (Wed, 14 May 2014)

  New Revision: 45942

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

  Log:
    * gc.c (rgengc_rememberset_mark): promote remembered object earlier.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45941)
+++ ChangeLog	(revision 45942)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed May 14 18:02:30 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (rgengc_rememberset_mark): promote remembered object earlier.
+
 Mon May 12 23:57:15 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (rb_cv_atan2_inf_c99): check whether runtime atan2
Index: gc.c
===================================================================
--- gc.c	(revision 45941)
+++ gc.c	(revision 45942)
@@ -4729,16 +4729,14 @@ rgengc_rememberset_mark(rb_objspace_t *o https://github.com/ruby/ruby/blob/trunk/gc.c#L4729
 			    rgengc_report(2, objspace, "rgengc_rememberset_mark: clear %p (%s)\n", p, obj_type_name((VALUE)p));
 #if RGENGC_AGE2_PROMOTION
 			    if (RVALUE_INFANT_P((VALUE)p)) {
-				/* infant objects should remain in remembered because remembered objects should become old objects */
-				/* young objects become old objects soon */
+				RVALUE_PROMOTE_INFANT(objspace, (VALUE)p);
+				RVALUE_PROMOTE_YOUNG(objspace, (VALUE)p);
 			    }
-			    else {
-				CLEAR_IN_BITMAP(bits, p);
+			    else if (RVALUE_YOUNG_P((VALUE)p)) {
+				RVALUE_PROMOTE_YOUNG(objspace, (VALUE)p);
 			    }
-#else
-			    CLEAR_IN_BITMAP(bits, p);
 #endif
-
+			    CLEAR_IN_BITMAP(bits, p);
 #if RGENGC_PROFILE > 0
 			    clear_count++;
 #endif

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

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