From 02881a7bf3e5a5920d258d13ed0aed282f252f07 Mon Sep 17 00:00:00 2001 From: Curtis Dunham Date: Wed, 30 Sep 2015 15:21:55 -0500 Subject: base: remove Trace::enabled flag The DTRACE() macro tests both Trace::enabled and the specific flag. This change uses the same administrative interface for enabling/disabling tracing, but masks the SimpleFlags settings directly. This eliminates a load for every DTRACE() test, e.g. DPRINTF. --- src/python/m5/trace.py | 4 ++-- src/python/swig/trace.i | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/python') diff --git a/src/python/m5/trace.py b/src/python/m5/trace.py index f34444810..a78b77fc1 100644 --- a/src/python/m5/trace.py +++ b/src/python/m5/trace.py @@ -32,7 +32,7 @@ import util from internal.trace import output, ignore def disable(): - internal.trace.cvar.enabled = False + internal.trace.disable() def enable(): - internal.trace.cvar.enabled = True + internal.trace.enable() diff --git a/src/python/swig/trace.i b/src/python/swig/trace.i index 6525b3e51..50ff7fd3d 100644 --- a/src/python/swig/trace.i +++ b/src/python/swig/trace.i @@ -54,9 +54,11 @@ ignore(const char *expr) Trace::getDebugLogger()->setIgnore(ignore); } -using Trace::enabled; +inline void enable() { Trace::enable(); } +inline void disable() { Trace::disable(); } %} extern void output(const char *string); extern void ignore(const char *expr); -extern bool enabled; +extern void enable(); +extern void disable(); -- cgit v1.2.3