diff options
-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: |