[svn:parrot] r43318 - in branches/boehm_gc: include/parrot src/gc src/string

bacek at svn.parrot.org bacek at svn.parrot.org
Wed Dec 30 12:19:56 UTC 2009


Author: bacek
Date: Wed Dec 30 12:19:55 2009
New Revision: 43318
URL: https://trac.parrot.org/parrot/changeset/43318

Log:
Get rid of GC_DEBUG macro. It's not so usefull and conflicting with
Boehm GC.

Modified:
   branches/boehm_gc/include/parrot/settings.h
   branches/boehm_gc/src/gc/gc_ms.c
   branches/boehm_gc/src/string/api.c

Modified: branches/boehm_gc/include/parrot/settings.h
==============================================================================
--- branches/boehm_gc/include/parrot/settings.h	Wed Dec 30 05:03:00 2009	(r43317)
+++ branches/boehm_gc/include/parrot/settings.h	Wed Dec 30 12:19:55 2009	(r43318)
@@ -25,14 +25,6 @@
 #  define DISABLE_GC_DEBUG 0
 #endif /* DISABLE_GC_DEBUG */
 
-/* Helpful internal macro for testing whether we are currently
- * debugging garbage collection and memory management. */
-#if DISABLE_GC_DEBUG
-#  define GC_DEBUG(interp) 0
-#else
-#  define GC_DEBUG(interp) Interp_flags_TEST((interp), PARROT_GC_DEBUG_FLAG)
-#endif /* DISABLE_GC_DEBUG */
-
 /*
  * GC_DEFAULT_TYPE selection
  * MS  -- stop-the-world mark & sweep

Modified: branches/boehm_gc/src/gc/gc_ms.c
==============================================================================
--- branches/boehm_gc/src/gc/gc_ms.c	Wed Dec 30 05:03:00 2009	(r43317)
+++ branches/boehm_gc/src/gc/gc_ms.c	Wed Dec 30 12:19:55 2009	(r43318)
@@ -476,7 +476,7 @@
     Parrot_add_to_free_list(interp, pool, new_arena);
 
     /* Allocate more next time */
-    if (GC_DEBUG(interp)) {
+    if (Interp_flags_TEST((interp), PARROT_GC_DEBUG_FLAG)) {
         pool->objects_per_alloc *= GC_DEBUG_UNITS_PER_ALLOC_GROWTH_FACTOR;
         pool->replenish_level =
                 (size_t)(pool->total_objects *

Modified: branches/boehm_gc/src/string/api.c
==============================================================================
--- branches/boehm_gc/src/string/api.c	Wed Dec 30 05:03:00 2009	(r43317)
+++ branches/boehm_gc/src/string/api.c	Wed Dec 30 12:19:55 2009	(r43318)
@@ -1683,8 +1683,9 @@
     }
 
 #if ! DISABLE_GC_DEBUG
+
     /* trigger GC for debug */
-    if (interp && GC_DEBUG(interp))
+    if (interp && Interp_flags_TEST((interp), PARROT_GC_DEBUG_FLAG))
         Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
 #endif
 
@@ -1837,7 +1838,7 @@
 
 #if ! DISABLE_GC_DEBUG
     /* trigger GC for debug */
-    if (interp && GC_DEBUG(interp))
+    if (interp && Interp_flags_TEST((interp), PARROT_GC_DEBUG_FLAG))
         Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
 #endif
 
@@ -1913,7 +1914,7 @@
 
 #if ! DISABLE_GC_DEBUG
     /* trigger GC for debug */
-    if (interp && GC_DEBUG(interp))
+    if (interp && Interp_flags_TEST((interp), PARROT_GC_DEBUG_FLAG))
         Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
 #endif
 
@@ -1992,7 +1993,7 @@
 
 #if ! DISABLE_GC_DEBUG
     /* trigger GC for debug */
-    if (interp && GC_DEBUG(interp))
+    if (interp && Interp_flags_TEST((interp), PARROT_GC_DEBUG_FLAG))
         Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
 #endif
 


More information about the parrot-commits mailing list