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.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user