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

ruby-changes:36407

From: ko1 <ko1@a...>
Date: Wed, 19 Nov 2014 07:18:09 +0900 (JST)
Subject: [ruby-changes:36407] ko1:r48488 (trunk): * gc.c (gc_record): add information for debug print.

ko1	2014-11-19 07:17:54 +0900 (Wed, 19 Nov 2014)

  New Revision: 48488

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

  Log:
    * gc.c (gc_record): add information for debug print.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48487)
+++ ChangeLog	(revision 48488)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Nov 18 14:16:47 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (gc_record): add information for debug print.
+
 Wed Nov 19 04:49:07 2014  NAKAMURA Usaku  <usa@r...>
 
 	* debug.c (set_debug_option): need the declaration.
Index: gc.c
===================================================================
--- gc.c	(revision 48487)
+++ gc.c	(revision 48488)
@@ -6008,19 +6008,21 @@ gc_record(rb_objspace_t *objspace, int d https://github.com/ruby/ruby/blob/trunk/gc.c#L6008
 	gc_current_status_fill(objspace, current_gc_status);
 #if 1
 	/* [last mutator time] [gc time] [event] */
-	fprintf(stderr, "%"PRItick"\t%"PRItick"\t%s\t[%s->%s]\n",
+	fprintf(stderr, "%"PRItick"\t%"PRItick"\t%s\t[%s->%s|%c]\n",
 		enter_tick - last_exit_tick,
 		exit_tick - enter_tick,
 		event,
-		last_gc_status, current_gc_status);
+		last_gc_status, current_gc_status,
+		(objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_MASK) ? '+' : '-');
 	last_exit_tick = exit_tick;
 #else
 	/* [enter_tick] [gc time] [event] */
-	fprintf(stderr, "%"PRItick"\t%"PRItick"\t%s\t[%s->%s]\n",
+	fprintf(stderr, "%"PRItick"\t%"PRItick"\t%s\t[%s->%s|%c]\n",
 		enter_tick,
 		exit_tick - enter_tick,
 		event,
-		last_gc_status, current_gc_status);
+		last_gc_status, current_gc_status,
+		(objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_MASK) ? '+' : '-');
 #endif
     }
 }

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

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