diff options
author | Nathan Binkert <binkertn@umich.edu> | 2007-02-17 20:32:39 -0800 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2007-02-17 20:32:39 -0800 |
commit | 08f024d3ff68ae533f9d96ebd0e470a1874a7d86 (patch) | |
tree | 435b7687ecc4d4f4d4251c6a70821c06e5cb0b5a /src | |
parent | 18e245ad0b6ee99f23e2ed67c150413295c69c1f (diff) | |
download | gem5-08f024d3ff68ae533f9d96ebd0e470a1874a7d86.tar.xz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/base/trace.cc | 2 | ||||
-rw-r--r-- | src/cpu/exetrace.hh | 3 | ||||
-rw-r--r-- | src/python/m5/main.py | 9 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/base/trace.cc b/src/base/trace.cc index 7afb038be..2dde1f688 100644 --- a/src/base/trace.cc +++ b/src/base/trace.cc @@ -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 diff --git a/src/cpu/exetrace.hh b/src/cpu/exetrace.hh index be10b4a6a..0f642c08e 100644 --- a/src/cpu/exetrace.hh +++ b/src/cpu/exetrace.hh @@ -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; diff --git a/src/python/m5/main.py b/src/python/m5/main.py index 25b52e830..98dc829d4 100644 --- a/src/python/m5/main.py +++ b/src/python/m5/main.py @@ -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) |