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

ruby-changes:31348

From: ko1 <ko1@a...>
Date: Sat, 26 Oct 2013 13:31:18 +0900 (JST)
Subject: [ruby-changes:31348] ko1:r43427 (trunk): * gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.

ko1	2013-10-26 13:31:10 +0900 (Sat, 26 Oct 2013)

  New Revision: 43427

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

  Log:
    * gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.
      We only need one sweep time measurement without lazy sweep.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43426)
+++ ChangeLog	(revision 43427)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Oct 26 13:25:45 2013  Koichi Sasada  <ko1@a...>
+
+	* gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.
+	  We only need one sweep time measurement without lazy sweep.
+
 Sat Oct 26 11:59:13 2013  Tanaka Akira  <akr@f...>
 
 	* addr2line.c: Include ELF header after system headers (especially
Index: gc.c
===================================================================
--- gc.c	(revision 43426)
+++ gc.c	(revision 43427)
@@ -2601,7 +2601,9 @@ gc_heap_lazy_sweep(rb_objspace_t *objspa https://github.com/ruby/ruby/blob/trunk/gc.c#L2601
 
     if (page == NULL) return FALSE;
 
+#if GC_ENABLE_LAZY_SWEEP
     gc_prof_sweep_timer_start(objspace);
+#endif
 
     while (page) {
 	heap->sweep_pages = next = page->next;
@@ -2618,7 +2620,9 @@ gc_heap_lazy_sweep(rb_objspace_t *objspa https://github.com/ruby/ruby/blob/trunk/gc.c#L2620
 	page = next;
     }
 
+#if GC_ENABLE_LAZY_SWEEP
     gc_prof_sweep_timer_stop(objspace);
+#endif
 
     return result;
 }
@@ -2646,12 +2650,14 @@ static void https://github.com/ruby/ruby/blob/trunk/gc.c#L2650
 gc_sweep(rb_objspace_t *objspace, int immediate_sweep)
 {
     if (immediate_sweep) {
+#if !GC_ENABLE_LAZY_SWEEP
 	gc_prof_sweep_timer_start(objspace);
+#endif
 	gc_before_sweep(objspace);
-
 	gc_heap_rest_sweep(objspace, heap_eden);
-
+#if !GC_ENABLE_LAZY_SWEEP
 	gc_prof_sweep_timer_stop(objspace);
+#endif
     }
     else {
 	gc_before_sweep(objspace);

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

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