Add in a few global options. Feel free to rename them, they're just the first thing...
authorKevin Lim <ktlim@umich.edu>
Wed, 14 Jun 2006 02:39:31 +0000 (22:39 -0400)
committerKevin Lim <ktlim@umich.edu>
Wed, 14 Jun 2006 02:39:31 +0000 (22:39 -0400)
src/python/m5/__init__.py:
    Add in a few global options.

--HG--
extra : convert_revision : e0dba78dd60f565a2e5cbda2cd6cf221bb3f4688

src/python/m5/__init__.py

index 60a61d66eb553e96efe8c32eb57b4c721afcf52c..2d4825b0efc03792208c3bceaca8fef65cd38610 100644 (file)
@@ -64,11 +64,34 @@ def AddToPath(path):
 def setTraceFlags(option, opt_str, value, parser):
     objects.Trace.flags = value
 
+def setTraceStart(option, opt_str, value, parser):
+    objects.Trace.start = value
+
+def clearPCSymbol(option, opt_str, value, parser):
+    objects.ExecutionTrace.pc_symbol = False
+
+def clearPrintCycle(option, opt_str, value, parser):
+    objects.ExecutionTrace.print_cycle = False
+
+def statsTextFile(option, opt_str, value, parser):
+    objects.Statistics.text_file = value
+
 # Standard optparse options.  Need to be explicitly included by the
 # user script when it calls optparse.OptionParser().
 standardOptions = [
     optparse.make_option("--traceflags", type="string", action="callback",
-                         callback=setTraceFlags)
+                         callback=setTraceFlags),
+    optparse.make_option("--tracestart", type="int", action="callback",
+                         callback=setTraceStart),
+    optparse.make_option("--nopcsymbol", action="callback",
+                         callback=clearPCSymbol,
+                         help="Turn off printing PC symbols in trace output"),
+    optparse.make_option("--noprintcycle", action="callback",
+                         callback=clearPrintCycle,
+                         help="Turn off printing cycles in trace output"),
+    optparse.make_option("--statsfile", type="string", action="callback",
+                         callback=statsTextFile, metavar="FILE",
+                         help="Sets the output file for the statistics")
     ]
 
 # make a SmartDict out of the build options for our local use