diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-06-13 22:40:02 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-06-13 22:40:02 -0400 |
commit | 7709e6ba93be4b67b22e2f3f9c853a3e1ab4458b (patch) | |
tree | 582d35cd1edd6a12e6c45929f84f9a8fe18f6c8e /src/python/m5 | |
parent | 285b88a57b0111cc6698f2e30182dca17d8ea15a (diff) | |
parent | 133903b28d06842ec8fd30ae8b439c37e33da31b (diff) | |
download | gem5-7709e6ba93be4b67b22e2f3f9c853a3e1ab4458b.tar.xz |
Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-merge
--HG--
extra : convert_revision : 5c0e56572c5ca14e0c9a7ac52b0453026e48b336
Diffstat (limited to 'src/python/m5')
-rw-r--r-- | src/python/m5/__init__.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/python/m5/__init__.py b/src/python/m5/__init__.py index 60a61d66e..2d4825b0e 100644 --- a/src/python/m5/__init__.py +++ b/src/python/m5/__init__.py @@ -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 |