Author: Whiteknight
Date: Mon Jul 21 18:38:55 2008
New Revision: 29664

Modified:
   branches/gsoc_pdd09/src/gc/dod.c
   branches/gsoc_pdd09/src/gc/gc_it.c
   branches/gsoc_pdd09/src/gc/gc_it.readme

Log:
[gsoc_pdd09] Fixes to implementation:
* Added long-missing support for GC_trace_normal and GC_trace_stack_FLAG
* Re-added trace_system_areas() into Parrot_dod_trace_root()

Modified: branches/gsoc_pdd09/src/gc/dod.c
==============================================================================
--- branches/gsoc_pdd09/src/gc/dod.c    (original)
+++ branches/gsoc_pdd09/src/gc/dod.c    Mon Jul 21 18:38:55 2008
@@ -386,7 +386,7 @@
     unsigned int i = 0;
 
     if (trace_stack) {
-        /* trace_system_areas(interp); */
+        trace_system_areas(interp);
         if (trace_stack == 2)
             return 0;
     }

Modified: branches/gsoc_pdd09/src/gc/gc_it.c
==============================================================================
--- branches/gsoc_pdd09/src/gc/gc_it.c  (original)
+++ branches/gsoc_pdd09/src/gc/gc_it.c  Mon Jul 21 18:38:55 2008
@@ -239,6 +239,11 @@
 {
     const Arenas * const arena_base   = interp->arena_base;
     Gc_it_data   * const gc_priv_data = (Gc_it_data *)(arena_base->gc_private);
+    const UINTVAL gc_trace = flags & (GC_trace_normal | GC_trace_stack_FLAG);
+    const UINTVAL gc_stack = flags & GC_trace_stack_FLAG;
+    const UINTVAL gc_lazy  = flags & GC_lazy_FLAG;
+    const UINTVAL gc_volatile = flags & GC_no_trace_volatile_roots;
+
 
     if (flags & GC_finish_FLAG) {
 
@@ -278,7 +283,12 @@
         case GC_IT_MARK_ROOTS:
             if (Parrot_is_blocked_GC_mark(interp))
                 break;
-            Parrot_dod_trace_root(interp, 1);
+            if (gc_trace && gc_stack)
+                Parrot_dod_trace_root(interp, 1);
+            else if (gc_stack)
+                Parrot_dod_trace_root(interp, 2);
+            else if (gc_trace)
+                Parrot_dod_trace_root(interp, 0);
             gc_priv_data->state = GC_IT_RESUME_MARK;
             GC_IT_BREAK_AFTER_2;
 

Modified: branches/gsoc_pdd09/src/gc/gc_it.readme
==============================================================================
--- branches/gsoc_pdd09/src/gc/gc_it.readme     (original)
+++ branches/gsoc_pdd09/src/gc/gc_it.readme     Mon Jul 21 18:38:55 2008
@@ -12,6 +12,7 @@
   commented out the code in src/gc/resources.c for now.
 # src/cpu_dep.c:trace_system_areas is causing segfaults (can't imagine why).
   I commented out the call to it in src/gc/dod.c:Parrot_dod_trace_root.
+  (Actually, this is back in now and seems to be working well)
 # Allocating lists causes problems in src/list.c:list_new. When I allocate
   directly from the system (not from the GC) it doesnt cause problems. (this 
might be fixed)
 # Sweep code causes problems. Sweep_pmc_pools causes more problems more often,

Reply via email to