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

ruby-changes:25344

From: nari <ko1@a...>
Date: Wed, 31 Oct 2012 18:22:50 +0900 (JST)
Subject: [ruby-changes:25344] nari:r37396 (trunk): * gc.c (gc_profile_record): don't define unused variables when

nari	2012-10-31 18:22:37 +0900 (Wed, 31 Oct 2012)

  New Revision: 37396

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

  Log:
    * gc.c (gc_profile_record): don't define unused variables when
      GC_PROFILE_MORE_DETAIL is 0.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37395)
+++ ChangeLog	(revision 37396)
@@ -1,3 +1,8 @@
+Wed Oct 31 18:17:38 2012  Narihiro Nakamura  <authornari@g...>
+
+	* gc.c (gc_profile_record): don't define unused variables when
+	  GC_PROFILE_MORE_DETAIL is 0.
+
 Wed Oct 31 18:10:53 2012  Narihiro Nakamura  <authornari@g...>
 
 	* gc.c (gc_prof_mark_timer_stop): count is not initialized.
Index: gc.c
===================================================================
--- gc.c	(revision 37395)
+++ gc.c	(revision 37396)
@@ -118,22 +118,27 @@
 
 typedef struct gc_profile_record {
     double gc_time;
+    double gc_invoke_time;
+
+    size_t heap_total_objects;
+    size_t heap_use_size;
+    size_t heap_total_size;
+
+    int is_marked;
+
+#if GC_PROFILE_MORE_DETAIL
     double gc_mark_time;
     double gc_sweep_time;
-    double gc_invoke_time;
 
     size_t heap_use_slots;
     size_t heap_live_objects;
     size_t heap_free_objects;
-    size_t heap_total_objects;
-    size_t heap_use_size;
-    size_t heap_total_size;
 
     int have_finalize;
-    int is_marked;
 
     size_t allocate_increase;
     size_t allocate_limit;
+#endif
 } gc_profile_record;
 
 

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

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