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
This commit is contained in:
20
src/python/m5/trace.py
Normal file
20
src/python/m5/trace.py
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user