sim: Clarify the difference between tracing and debugging
This patch changes the name the command-line options related to debug output to all start with "debug" rather than being a mix of that and "trace". It also makes it clear that the breakpoint time is specified in ticks and not in cycles.
This commit is contained in:
parent
3e6da89419
commit
c9a8b7b147
4 changed files with 19 additions and 22 deletions
|
@ -31,7 +31,7 @@ from UserDict import DictMixin
|
||||||
import internal
|
import internal
|
||||||
|
|
||||||
from internal.debug import SimpleFlag, CompoundFlag
|
from internal.debug import SimpleFlag, CompoundFlag
|
||||||
from internal.debug import schedBreakCycle, setRemoteGDBPort
|
from internal.debug import schedBreak, setRemoteGDBPort
|
||||||
from m5.util import printList
|
from m5.util import printList
|
||||||
|
|
||||||
def help():
|
def help():
|
||||||
|
|
|
@ -95,23 +95,20 @@ def parse_options():
|
||||||
# Debugging options
|
# Debugging options
|
||||||
group("Debugging Options")
|
group("Debugging Options")
|
||||||
option("--debug-break", metavar="TIME[,TIME]", action='append', split=',',
|
option("--debug-break", metavar="TIME[,TIME]", action='append', split=',',
|
||||||
help="Cycle to create a breakpoint")
|
help="Tick to create a breakpoint")
|
||||||
option("--debug-help", action='store_true',
|
option("--debug-help", action='store_true',
|
||||||
help="Print help on trace flags")
|
help="Print help on debug flags")
|
||||||
option("--debug-flags", metavar="FLAG[,FLAG]", action='append', split=',',
|
option("--debug-flags", metavar="FLAG[,FLAG]", action='append', split=',',
|
||||||
help="Sets the flags for tracing (-FLAG disables a flag)")
|
help="Sets the flags for debug output (-FLAG disables a flag)")
|
||||||
|
option("--debug-start", metavar="TIME", type='int',
|
||||||
|
help="Start debug output at TIME (must be in ticks)")
|
||||||
|
option("--debug-file", metavar="FILE", default="cout",
|
||||||
|
help="Sets the output file for debug [Default: %default]")
|
||||||
|
option("--debug-ignore", metavar="EXPR", action='append', split=':',
|
||||||
|
help="Ignore EXPR sim objects")
|
||||||
option("--remote-gdb-port", type='int', default=7000,
|
option("--remote-gdb-port", type='int', default=7000,
|
||||||
help="Remote gdb base port (set to 0 to disable listening)")
|
help="Remote gdb base port (set to 0 to disable listening)")
|
||||||
|
|
||||||
# Tracing options
|
|
||||||
group("Trace Options")
|
|
||||||
option("--trace-start", metavar="TIME", type='int',
|
|
||||||
help="Start tracing at TIME (must be in ticks)")
|
|
||||||
option("--trace-file", metavar="FILE", default="cout",
|
|
||||||
help="Sets the output file for tracing [Default: %default]")
|
|
||||||
option("--trace-ignore", metavar="EXPR", action='append', split=':',
|
|
||||||
help="Ignore EXPR sim objects")
|
|
||||||
|
|
||||||
# Help options
|
# Help options
|
||||||
group("Help Options")
|
group("Help Options")
|
||||||
option("--list-sim-objects", action='store_true', default=False,
|
option("--list-sim-objects", action='store_true', default=False,
|
||||||
|
@ -316,7 +313,7 @@ def main(*args):
|
||||||
# set debugging options
|
# set debugging options
|
||||||
debug.setRemoteGDBPort(options.remote_gdb_port)
|
debug.setRemoteGDBPort(options.remote_gdb_port)
|
||||||
for when in options.debug_break:
|
for when in options.debug_break:
|
||||||
debug.schedBreakCycle(int(when))
|
debug.schedBreak(int(when))
|
||||||
|
|
||||||
if options.debug_flags:
|
if options.debug_flags:
|
||||||
check_tracing()
|
check_tracing()
|
||||||
|
@ -338,16 +335,16 @@ def main(*args):
|
||||||
else:
|
else:
|
||||||
debug.flags[flag].enable()
|
debug.flags[flag].enable()
|
||||||
|
|
||||||
if options.trace_start:
|
if options.debug_start:
|
||||||
check_tracing()
|
check_tracing()
|
||||||
e = event.create(trace.enable, event.Event.Trace_Enable_Pri)
|
e = event.create(trace.enable, event.Event.Debug_Enable_Pri)
|
||||||
event.mainq.schedule(e, options.trace_start)
|
event.mainq.schedule(e, options.debug_start)
|
||||||
else:
|
else:
|
||||||
trace.enable()
|
trace.enable()
|
||||||
|
|
||||||
trace.output(options.trace_file)
|
trace.output(options.debug_file)
|
||||||
|
|
||||||
for ignore in options.trace_ignore:
|
for ignore in options.debug_ignore:
|
||||||
check_tracing()
|
check_tracing()
|
||||||
trace.ignore(ignore)
|
trace.ignore(ignore)
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ DebugBreakEvent::description() const
|
||||||
// (callable from debugger)
|
// (callable from debugger)
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
schedBreakCycle(Tick when)
|
schedBreak(Tick when)
|
||||||
{
|
{
|
||||||
mainEventQueue.schedule(new DebugBreakEvent, when);
|
mainEventQueue.schedule(new DebugBreakEvent, when);
|
||||||
warn("need to stop all queues");
|
warn("need to stop all queues");
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
|
|
||||||
|
|
||||||
/** Cause the simulator to execute a breakpoint
|
/** Cause the simulator to execute a breakpoint
|
||||||
* @param when the cycle to break
|
* @param when the tick to break
|
||||||
*/
|
*/
|
||||||
void schedBreakCycle(Tick when);
|
void schedBreak(Tick when);
|
||||||
|
|
||||||
/** Cause the simulator to return to python to create a checkpoint
|
/** Cause the simulator to return to python to create a checkpoint
|
||||||
* @param when the cycle to break
|
* @param when the cycle to break
|
||||||
|
|
Loading…
Reference in a new issue