From: <pet...@us...> - 2007-06-22 07:47:56
|
Revision: 12764 http://svn.sourceforge.net/jikesrvm/?rev=12764&view=rev Author: peter_donald Date: 2007-06-22 00:47:54 -0700 (Fri, 22 Jun 2007) Log Message: ----------- MMTk should not emit debug information in scenarios that could be considered normal conditions (such as OOM). Guard the debug so that is only emitted when verbose > 1 Modified Paths: -------------- rvmroot/trunk/MMTk/src/org/mmtk/utility/Barrier.java rvmroot/trunk/MMTk/src/org/mmtk/utility/alloc/Allocator.java Modified: rvmroot/trunk/MMTk/src/org/mmtk/utility/Barrier.java =================================================================== --- rvmroot/trunk/MMTk/src/org/mmtk/utility/Barrier.java 2007-06-22 07:02:52 UTC (rev 12763) +++ rvmroot/trunk/MMTk/src/org/mmtk/utility/Barrier.java 2007-06-22 07:47:54 UTC (rev 12764) @@ -15,6 +15,7 @@ import org.mmtk.vm.SynchronizedCounter; import org.mmtk.vm.VM; +import org.mmtk.utility.options.Options; import org.vmmagic.pragma.*; @@ -111,14 +112,19 @@ } else { long elapsed = VM.statistics.cycles() - startCheck; if (elapsed - lastElapsed > WARN_PERIOD) { - Log.write("GC Warning: Barrier wait has reached "); Log.write(VM.statistics.cyclesToSecs(elapsed)); - Log.write(" seconds. Called from "); Log.write(where); Log.write(". myOrder = "); Log.write(myValue); - Log.write(" count is "); Log.write(c.peek()); Log.write(" waiting for "); Log.write(target - 1); - Log.writeln(); - lastElapsed = elapsed; + if (Options.verbose.getValue() >= 1) { + Log.write("GC Warning: Barrier wait has reached "); Log.write(VM.statistics.cyclesToSecs(elapsed)); + Log.write(" seconds. Called from "); Log.write(where); Log.write(". myOrder = "); Log.write(myValue); + Log.write(" count is "); Log.write(c.peek()); Log.write(" waiting for "); Log.write(target - 1); + Log.writeln(); + lastElapsed = elapsed; + } } - if (elapsed > TIME_OUT) - VM.assertions.fail("GC Error: Barrier Timeout"); + if (elapsed > TIME_OUT) { + if (Options.verbose.getValue() >= 1) { + VM.assertions.fail("GC Error: Barrier Timeout"); + } + } } } } Modified: rvmroot/trunk/MMTk/src/org/mmtk/utility/alloc/Allocator.java =================================================================== --- rvmroot/trunk/MMTk/src/org/mmtk/utility/alloc/Allocator.java 2007-06-22 07:02:52 UTC (rev 12763) +++ rvmroot/trunk/MMTk/src/org/mmtk/utility/alloc/Allocator.java 2007-06-22 07:47:54 UTC (rev 12764) @@ -15,6 +15,7 @@ import org.mmtk.plan.Plan; import org.mmtk.policy.Space; import org.mmtk.utility.*; +import org.mmtk.utility.options.Options; import org.mmtk.utility.statistics.*; import org.mmtk.vm.VM; @@ -259,16 +260,18 @@ current = VM.activePlan.mutator().getOwnAllocator(current); } } - Log.write("GC Warning: Possible VM range imbalance - Allocator.allocSlow failed on request of "); - Log.write(bytes); - Log.write(" on space "); - Log.writeln(Plan.getSpaceNameFromAllocatorAnyLocal(this)); - Log.write("gcCountStart = "); - Log.writeln(gcCountStart); - Log.write("gcCount (now) = "); - Log.writeln(Stats.gcCount()); - Space.printUsageMB(); - VM.assertions.dumpStack(); + if (Options.verbose.getValue() >= 1) { + Log.write("GC Warning: Possible VM range imbalance - Allocator.allocSlow failed on request of "); + Log.write(bytes); + Log.write(" on space "); + Log.writeln(Plan.getSpaceNameFromAllocatorAnyLocal(this)); + Log.write("gcCountStart = "); + Log.writeln(gcCountStart); + Log.write("gcCount (now) = "); + Log.writeln(Stats.gcCount()); + Space.printUsageMB(); + VM.assertions.dumpStack(); + } VM.assertions.failWithOutOfMemoryError(); /* NOTREACHED */ return Address.zero(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |