diff options
author | Michael LeBeane <Michael.Lebeane@amd.com> | 2016-02-13 12:36:43 -0500 |
---|---|---|
committer | Michael LeBeane <Michael.Lebeane@amd.com> | 2016-02-13 12:36:43 -0500 |
commit | 2ae4cce3934873908afacc81b65d4093731a3e93 (patch) | |
tree | eeea7b284d25f9517ec220070dbeb114877c8762 /src/python | |
parent | 8d923c7380f1d5a1418c1d4b71cd4cfc63429448 (diff) | |
download | gem5-2ae4cce3934873908afacc81b65d4093731a3e93.tar.xz |
configs: add command-line option to stop debug output
This patch adds a --debug-end flag to main.py so that debug output can be
stoped at a specified tick, while allowing the simulation to continue. It is
useful in situations where you would like to produce a trace for a region of
interest while still collecting stats for the entire run. This is in contrast
to the currently existing --debug-break flag, which terminates the simulation
at the tick.
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/m5/main.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/python/m5/main.py b/src/python/m5/main.py index 4b3bf410c..deb4725ac 100644 --- a/src/python/m5/main.py +++ b/src/python/m5/main.py @@ -103,6 +103,8 @@ def parse_options(): help="Sets the flags for debug output (-FLAG disables a flag)") option("--debug-start", metavar="TICK", type='int', help="Start debug output at TICK") + option("--debug-end", metavar="TICK", type='int', + help="End debug output at TICK") option("--debug-file", metavar="FILE", default="cout", help="Sets the output file for debug [Default: %default]") option("--debug-ignore", metavar="EXPR", action='append', split=':', @@ -348,6 +350,11 @@ def main(*args): else: trace.enable() + if options.debug_end: + check_tracing() + e = event.create(trace.disable, event.Event.Debug_Enable_Pri) + event.mainq.schedule(e, options.debug_end) + trace.output(options.debug_file) for ignore in options.debug_ignore: |