[svn:parrot] r39215 - trunk/src/gc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Thu May 28 08:50:25 UTC 2009
Author: chromatic
Date: Thu May 28 08:50:24 2009
New Revision: 39215
URL: https://trac.parrot.org/parrot/changeset/39215
Log:
[GC] Flipped the Arena replenish level check in gc_ms_more_traceable_objects().
This tuning parameter represents the threshold of free objects beyond which it
doesn't make sense to try to reclaim more objects in the pool during the next
GC run. With the current parameter value, we assert that an arena with 30% or
more free objects isn't likely to fill up before the next run.
Rakudo's hello world program is 6.79% faster with this small change.
Modified:
trunk/src/gc/gc_ms.c
Modified: trunk/src/gc/gc_ms.c
==============================================================================
--- trunk/src/gc/gc_ms.c Thu May 28 08:08:29 2009 (r39214)
+++ trunk/src/gc/gc_ms.c Thu May 28 08:50:24 2009 (r39215)
@@ -123,6 +123,7 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
+/* the percent of used Arena items at which to trace next time through */
#define GC_DEBUG_REPLENISH_LEVEL_FACTOR 0.0
#define GC_DEBUG_UNITS_PER_ALLOC_GROWTH_FACTOR 1
#define REPLENISH_LEVEL_FACTOR 0.3
@@ -372,7 +373,7 @@
if (arena->used == arena->total_objects)
Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
- if (pool->num_free_objects <= pool->replenish_level)
+ if (pool->num_free_objects > pool->replenish_level)
pool->skip = 1;
}
}
More information about the parrot-commits
mailing list