diff options
author | Nathan Binkert <binkertn@umich.edu> | 2007-02-10 15:14:50 -0800 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2007-02-10 15:14:50 -0800 |
commit | 184decd1963a7f016231f7614b5e739ad514ed37 (patch) | |
tree | 255576eeee2401b9148aa9610559cc9b5e024807 /src/python | |
parent | 63a82400596b9331d1babe88624f97209286d0b9 (diff) | |
download | gem5-184decd1963a7f016231f7614b5e739ad514ed37.tar.xz |
Clean up tracing stuff more, get rid of the trace log since
its not all that useful. Fix a few bugs with python/C++
integration.
--HG--
extra : convert_revision : a706512f7dc8b0c88f1ff96fe35ab8fbf9548b78
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/m5/main.py | 5 | ||||
-rw-r--r-- | src/python/swig/trace.i | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/python/m5/main.py b/src/python/m5/main.py index 0bd5b431a..d02bc466b 100644 --- a/src/python/m5/main.py +++ b/src/python/m5/main.py @@ -268,7 +268,7 @@ def main(): internal.debug.schedBreakCycle(int(when)) for flag in options.trace_flags: - internal.trace.setFlag(flag) + internal.trace.set(flag) if options.trace_start is not None: internal.trace.enabled = False @@ -276,8 +276,7 @@ def main(): internal.event.enabled = True internal.event.create(enable_trace, options.trace_start) - #if options.trace_file is not None: - # internal.trace.file(options.trace_file) + internal.trace.output(options.trace_file) for ignore in options.trace_ignore: internal.trace.ignore(ignore) diff --git a/src/python/swig/trace.i b/src/python/swig/trace.i index 5d1669d02..69b44c025 100644 --- a/src/python/swig/trace.i +++ b/src/python/swig/trace.i @@ -33,18 +33,23 @@ %{ #include "base/trace.hh" #include "sim/host.hh" -#include "sim/trace_control.hh" + +inline void +output(const char *filename) +{ + Trace::setOutput(filename); +} inline void set(const char *flag) { - setTraceFlag(flag); + Trace::changeFlag(flag, true); } inline void clear(const char *flag) { - clearTraceFlag(flag); + Trace::changeFlag(flag, false); } inline void @@ -57,9 +62,10 @@ using Trace::enabled; %} %inline %{ -extern void ignore(const char *expr); +extern void output(const char *string); extern void set(const char *string); extern void clear(const char *string); +extern void ignore(const char *expr); extern bool enabled; %} |