From: <dfr...@us...> - 2007-08-29 09:42:15
|
Revision: 13396 http://jikesrvm.svn.sourceforge.net/jikesrvm/?rev=13396&view=rev Author: dframpton-oss Date: 2007-08-29 02:42:09 -0700 (Wed, 29 Aug 2007) Log Message: ----------- Add an option to allow using the generational collector in combination with the static write barrier instead of scanning the statics every nursery gc. This is primarily intended as a tool for ensuring static write barriers do not regress, but it may be interesting to compare the performance between the two modes. Modified Paths: -------------- rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/Gen.java rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/GenCollector.java rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/GenConstraints.java Modified: rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/Gen.java =================================================================== --- rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/Gen.java 2007-08-29 09:03:39 UTC (rev 13395) +++ rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/Gen.java 2007-08-29 09:42:09 UTC (rev 13396) @@ -50,6 +50,7 @@ protected static final float SURVIVAL_ESTIMATE = (float) 0.8; // est yield protected static final float MATURE_FRACTION = (float) 0.5; // est yield public static final boolean IGNORE_REMSETS = false; + public static final boolean USE_STATIC_WRITE_BARRIER = false; // Allocators public static final int ALLOC_NURSERY = ALLOC_DEFAULT; Modified: rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/GenCollector.java =================================================================== --- rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/GenCollector.java 2007-08-29 09:03:39 UTC (rev 13395) +++ rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/GenCollector.java 2007-08-29 09:42:09 UTC (rev 13396) @@ -90,6 +90,14 @@ return; } + if (phaseId == StopTheWorld.ROOTS) { + if (!Gen.USE_STATIC_WRITE_BARRIER || global().traceFullHeap()) { + VM.scanning.computeStaticRoots(getCurrentTrace()); + } + VM.scanning.computeThreadRoots(getCurrentTrace()); + return; + } + if (phaseId == Gen.BOOTIMAGE_ROOTS) { if (global().traceFullHeap()) { super.collectionPhase(phaseId, primary); Modified: rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/GenConstraints.java =================================================================== --- rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/GenConstraints.java 2007-08-29 09:03:39 UTC (rev 13395) +++ rvmroot/trunk/MMTk/src/org/mmtk/plan/generational/GenConstraints.java 2007-08-29 09:42:09 UTC (rev 13396) @@ -40,4 +40,7 @@ /** @return True if this plan requires a write barrier */ public boolean needsWriteBarrier() { return true; } + + /** @return True if this plan requires a static barrier */ + public boolean needsStaticWriteBarrier() { return Gen.USE_STATIC_WRITE_BARRIER; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |