From 0876c822dd25e57e8811ceb31f67a3536c9855b0 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 19 Jan 2009 09:59:13 -0800 Subject: tracing: panic() if people try to use tracing, but TRACING_ON is not set. Also clean things up so that help strings can more easily be added. Move the help function into trace.py --- src/python/m5/trace.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/python/m5/trace.py (limited to 'src/python/m5/trace.py') diff --git a/src/python/m5/trace.py b/src/python/m5/trace.py new file mode 100644 index 000000000..9e2351dbe --- /dev/null +++ b/src/python/m5/trace.py @@ -0,0 +1,20 @@ +import internal +import traceflags as flags + +from internal.trace import clear, output, set, ignore + +def enable(): + internal.trace.cvar.enabled = True + +def help(): + print "Base Flags:" + for flag in trace.flags.basic: + print " %s: %s" % (flag, trace.flags.descriptions[flag]) + print + print "Compound Flags:" + for flag in trace.flags.compound: + if flag == 'All': + continue + print " %s: %s" % (flag, trace.flags.descriptions[flag]) + print_list(trace.flags.compoundMap[flag], indent=8) + print -- cgit v1.2.3