Default to tracing being disabled in C++, it will be turned
on in python. Fix the trace start code so it actually starts when it is suppsed to. Make the Exec tracing stuff obey the trace enabled flag. --HG-- extra : convert_revision : 634ba0b4f52345d4bf40d43e239cef7ef43e7691
This commit is contained in:
@@ -47,7 +47,7 @@ using namespace std;
|
||||
namespace Trace {
|
||||
const string DefaultName("global");
|
||||
FlagVec flags(NumFlags, false);
|
||||
bool enabled = true;
|
||||
bool enabled = false;
|
||||
|
||||
//
|
||||
// This variable holds the output stream for debug information. Other
|
||||
|
||||
@@ -157,6 +157,9 @@ getInstRecord(Tick when, ThreadContext *tc, const StaticInstPtr staticInst,
|
||||
if (!IsOn(ExecEnable))
|
||||
return NULL;
|
||||
|
||||
if (!Trace::enabled)
|
||||
return NULL;
|
||||
|
||||
if (!IsOn(ExecSpeculative) && tc->misspeculating())
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -292,11 +292,12 @@ def main():
|
||||
for flag in off_flags:
|
||||
internal.trace.clear(flag)
|
||||
|
||||
if options.trace_start is not None:
|
||||
internal.trace.enabled = False
|
||||
if options.trace_start:
|
||||
def enable_trace():
|
||||
internal.event.enabled = True
|
||||
internal.event.create(enable_trace, options.trace_start)
|
||||
internal.trace.cvar.enabled = True
|
||||
internal.event.create(enable_trace, int(options.trace_start))
|
||||
else:
|
||||
internal.trace.enabled = True
|
||||
|
||||
internal.trace.output(options.trace_file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user