[svn:parrot] r36547 - in trunk: docs/pdds include/parrot src src/gc

cotto at svn.parrot.org cotto at svn.parrot.org
Tue Feb 10 17:32:02 UTC 2009


Author: cotto
Date: Tue Feb 10 17:32:02 2009
New Revision: 36547
URL: https://trac.parrot.org/parrot/changeset/36547

Log:
[gc] change all instances of lazy_dod to lazy_gc
also add a docs fix ommitted earlier

Modified:
   trunk/docs/pdds/pdd09_gc.pod
   trunk/include/parrot/resources.h
   trunk/src/gc/generational_ms.c
   trunk/src/gc/incremental_ms.c
   trunk/src/gc/mark_sweep.c
   trunk/src/inter_misc.c

Modified: trunk/docs/pdds/pdd09_gc.pod
==============================================================================
--- trunk/docs/pdds/pdd09_gc.pod	Tue Feb 10 17:28:11 2009	(r36546)
+++ trunk/docs/pdds/pdd09_gc.pod	Tue Feb 10 17:32:02 2009	(r36547)
@@ -380,7 +380,7 @@
 For a concurrent collector, calls to this function may activate a concurrent
 collection thread or, if such a thread is already running, do nothing at all.
 
-The C<do_gc_mark> function is called from the C<Parrot_do_dod_run> function,
+The C<do_gc_mark> function is called from the C<Parrot_do_gc_run> function,
 and should not usually be called directly.
 
 C<flags> is one of:

Modified: trunk/include/parrot/resources.h
==============================================================================
--- trunk/include/parrot/resources.h	Tue Feb 10 17:28:11 2009	(r36546)
+++ trunk/include/parrot/resources.h	Tue Feb 10 17:32:02 2009	(r36547)
@@ -142,7 +142,7 @@
      * statistics for DOD and GC
      */
     size_t  dod_runs;           /* Number of times we've done a DOD sweep */
-    size_t  lazy_dod_runs;      /* Number of successful lazy DOD sweep */
+    size_t  lazy_gc_runs;       /* Number of successful lazy DOD sweep */
     size_t  collect_runs;       /* Number of times we've
                                  * done a memory compaction
                                  */
@@ -168,7 +168,7 @@
     PMC* gc_mark_start;         /* first PMC marked during a DOD run */
     PMC* gc_mark_ptr;           /* last PMC marked during a DOD run */
     PMC* gc_trace_ptr;          /* last PMC trace_children was called on */
-    int lazy_dod;               /* flag that indicates whether we should stop
+    int lazy_gc;                /* flag that indicates whether we should stop
                                    when we've seen all impatient PMCs */
     /*
      * DOD, GC blocking

Modified: trunk/src/gc/generational_ms.c
==============================================================================
--- trunk/src/gc/generational_ms.c	Tue Feb 10 17:28:11 2009	(r36546)
+++ trunk/src/gc/generational_ms.c	Tue Feb 10 17:32:02 2009	(r36547)
@@ -1598,14 +1598,14 @@
 {
     ASSERT_ARGS(trace_children_cb)
     Arenas * const arena_base = interp->arena_base;
-    const int lazy_dod = arena_base->lazy_dod;
+    const int lazy_gc = arena_base->lazy_gc;
     Gc_gms_hdr *h;
 
     for (h = pool->gray; h != pool->white;) {
         PMC * const current = (PMC*)GMSH_to_PObj(h);
         UINTVAL bits;
 
-        if (lazy_dod && arena_base->num_early_PMCs_seen >=
+        if (lazy_gc && arena_base->num_early_PMCs_seen >=
                 arena_base->num_early_DOD_PMCs) {
             return 1;
         }
@@ -1864,9 +1864,9 @@
 
     /* normal or lazy DOD run */
     arena_base->dod_runs++;
-    arena_base->lazy_dod = (flags & GC_lazy_FLAG);
+    arena_base->lazy_gc = (flags & GC_lazy_FLAG);
     gc_gms_init_mark(interp);
-    if (gc_gms_trace_root(interp, !arena_base->lazy_dod) &&
+    if (gc_gms_trace_root(interp, !arena_base->lazy_gc) &&
             gc_gms_trace_children(interp)) {
         gc_gms_sweep(interp);
         gc_gms_set_gen(interp);
@@ -1875,7 +1875,7 @@
         /*
          * successful lazy DOD run
          */
-        ++arena_base->lazy_dod_runs;
+        ++arena_base->lazy_gc_runs;
     }
     gc_gms_end_cycle(interp);
     --arena_base->DOD_block_level;

Modified: trunk/src/gc/incremental_ms.c
==============================================================================
--- trunk/src/gc/incremental_ms.c	Tue Feb 10 17:28:11 2009	(r36546)
+++ trunk/src/gc/incremental_ms.c	Tue Feb 10 17:32:02 2009	(r36547)
@@ -698,7 +698,7 @@
     Gc_ims_private *g_ims;
     Arenas * const  arena_base = interp->arena_base;
 
-    arena_base->lazy_dod = 0;
+    arena_base->lazy_gc = 0;
     Parrot_gc_ms_run_init(interp);
 
     /*
@@ -745,7 +745,7 @@
 
     todo = (size_t)(g_ims->alloc_trigger * g_ims->throttle * work_factor);
 
-    PARROT_ASSERT(arena_base->lazy_dod == 0);
+    PARROT_ASSERT(arena_base->lazy_gc == 0);
     Parrot_gc_trace_children(interp, todo);
 
     /* check if we are finished with marking -- the end is self-referential */
@@ -1104,7 +1104,7 @@
 
     /* if we stopped early, the lazy run was successful */
     if (g_ims->state < GC_IMS_COLLECT)
-        ++arena_base->lazy_dod_runs;
+        ++arena_base->lazy_gc_runs;
 
     g_ims->lazy = 0;
 }

Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c	Tue Feb 10 17:28:11 2009	(r36546)
+++ trunk/src/gc/mark_sweep.c	Tue Feb 10 17:32:02 2009	(r36547)
@@ -195,7 +195,7 @@
     }
 
     ++arena_base->DOD_block_level;
-    arena_base->lazy_dod = flags & GC_lazy_FLAG;
+    arena_base->lazy_gc = flags & GC_lazy_FLAG;
 
     /* tell the threading system that we're doing DOD mark */
     pt_DOD_start_mark(interp);
@@ -228,7 +228,7 @@
         pt_DOD_stop_mark(interp); /* XXX */
 
         /* successful lazy DOD count */
-        ++arena_base->lazy_dod_runs;
+        ++arena_base->lazy_gc_runs;
 
         Parrot_gc_clear_live_bits(interp);
         if (interp->profile)
@@ -352,7 +352,7 @@
     Parrot_IOData_mark(interp, interp->piodata);
 
     /* quick check if we can already bail out */
-    if (arena_base->lazy_dod
+    if (arena_base->lazy_gc
     &&  arena_base->num_early_PMCs_seen >= arena_base->num_early_DOD_PMCs)
         return 0;
 
@@ -954,7 +954,7 @@
 {
     ASSERT_ARGS(Parrot_gc_trace_children)
     Arenas * const arena_base = interp->arena_base;
-    const int      lazy_dod   = arena_base->lazy_dod;
+    const int      lazy_gc    = arena_base->lazy_gc;
     PMC           *current    = arena_base->gc_mark_start;
 
     /*
@@ -974,7 +974,7 @@
     do {
         PMC *next;
 
-        if (lazy_dod && arena_base->num_early_PMCs_seen >=
+        if (lazy_gc && arena_base->num_early_PMCs_seen >=
                 arena_base->num_early_DOD_PMCs) {
             return 0;
         }

Modified: trunk/src/inter_misc.c
==============================================================================
--- trunk/src/inter_misc.c	Tue Feb 10 17:28:11 2009	(r36546)
+++ trunk/src/inter_misc.c	Tue Feb 10 17:32:02 2009	(r36547)
@@ -249,7 +249,7 @@
             ret = arena_base->dod_runs;
             break;
         case LAZY_DOD_RUNS:
-            ret = arena_base->lazy_dod_runs;
+            ret = arena_base->lazy_gc_runs;
             break;
         case COLLECT_RUNS:
             ret = arena_base->collect_runs;


More information about the parrot-commits mailing list