changeset 5981f61b8936 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=5981f61b8936
description:
        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:

 src/python/m5/main.py |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r 4e3bf51208ba -r 5981f61b8936 src/python/m5/main.py
--- a/src/python/m5/main.py     Sat Feb 13 12:33:07 2016 -0500
+++ b/src/python/m5/main.py     Sat Feb 13 12:36:43 2016 -0500
@@ -103,6 +103,8 @@
         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 @@
     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:
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to