main.py (4042:dbd98b2264ed) main.py (4044:204fd77bae19)
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 123 unchanged lines hidden (view full) ---

132set_group("Debugging Options")
133add_option("--debug-break", metavar="TIME[,TIME]", action='append', split=',',
134 help="Cycle to create a breakpoint")
135
136# Tracing options
137set_group("Trace Options")
138add_option("--trace-flags", metavar="FLAG[,FLAG]", action='append', split=',',
139 help="Sets the flags for tracing")
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 123 unchanged lines hidden (view full) ---

132set_group("Debugging Options")
133add_option("--debug-break", metavar="TIME[,TIME]", action='append', split=',',
134 help="Cycle to create a breakpoint")
135
136# Tracing options
137set_group("Trace Options")
138add_option("--trace-flags", metavar="FLAG[,FLAG]", action='append', split=',',
139 help="Sets the flags for tracing")
140add_option("--trace-start", metavar="TIME", default='0s',
141 help="Start tracing at TIME (must have units)")
140add_option("--trace-start", metavar="TIME", type='int',
141 help="Start tracing at TIME (must be in ticks)")
142add_option("--trace-file", metavar="FILE", default="cout",
143 help="Sets the output file for tracing [Default: %default]")
142add_option("--trace-file", metavar="FILE", default="cout",
143 help="Sets the output file for tracing [Default: %default]")
144add_option("--trace-circlebuf", metavar="SIZE", type="int", default=0,
145 help="If SIZE is non-zero, turn on the circular buffer with SIZE lines")
146add_option("--no-trace-circlebuf", action="store_const", const=0,
147 dest='trace_circlebuf', help=optparse.SUPPRESS_HELP)
148bool_option("trace-dumponexit", default=False,
149 help="Dump trace buffer on exit")
150add_option("--trace-ignore", metavar="EXPR", action='append', split=':',
151 help="Ignore EXPR sim objects")
152
153# Execution Trace options
154set_group("Execution Trace Options")
155bool_option("speculative", default=True,
156 help="Don't capture speculative instructions")
157bool_option("print-cycle", default=True,

--- 119 unchanged lines hidden (view full) ---

277 internal.trace.setFlag(flag)
278
279 if options.trace_start is not None:
280 internal.trace.enabled = False
281 def enable_trace():
282 internal.event.enabled = True
283 internal.event.create(enable_trace, options.trace_start)
284
144add_option("--trace-ignore", metavar="EXPR", action='append', split=':',
145 help="Ignore EXPR sim objects")
146
147# Execution Trace options
148set_group("Execution Trace Options")
149bool_option("speculative", default=True,
150 help="Don't capture speculative instructions")
151bool_option("print-cycle", default=True,

--- 119 unchanged lines hidden (view full) ---

271 internal.trace.setFlag(flag)
272
273 if options.trace_start is not None:
274 internal.trace.enabled = False
275 def enable_trace():
276 internal.event.enabled = True
277 internal.event.create(enable_trace, options.trace_start)
278
285 if options.trace_file is not None:
286 internal.trace.file(options.trace_file)
279 #if options.trace_file is not None:
280 # internal.trace.file(options.trace_file)
287
281
288 if options.trace_bufsize is not None:
289 internal.trace.buffer_size(options.bufsize)
290
291 #if options.trace_dumponexit:
292 # internal.trace.dumpOnExit = True
293
294 for ignore in options.trace_ignore:
295 internal.trace.ignore(ignore)
296
297 # set execution trace options
298 objects.ExecutionTrace.speculative = options.speculative
299 objects.ExecutionTrace.print_cycle = options.print_cycle
300 objects.ExecutionTrace.pc_symbol = options.print_symbol
301 objects.ExecutionTrace.print_opclass = options.print_opclass

--- 44 unchanged lines hidden ---
282 for ignore in options.trace_ignore:
283 internal.trace.ignore(ignore)
284
285 # set execution trace options
286 objects.ExecutionTrace.speculative = options.speculative
287 objects.ExecutionTrace.print_cycle = options.print_cycle
288 objects.ExecutionTrace.pc_symbol = options.print_symbol
289 objects.ExecutionTrace.print_opclass = options.print_opclass

--- 44 unchanged lines hidden ---