Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45008 )

Change subject: base: Move TRACING_ON check into Flag::tracing().
......................................................................

base: Move TRACING_ON check into Flag::tracing().

Now DTRACE is simply an alias for Debug::x. We should keep it now for
compatibility, but it can be removed over time.

Change-Id: Icda18ff57126328e98e440e3a81bf13caa0c27df
---
M src/base/debug.hh
1 file changed, 4 insertions(+), 4 deletions(-)



diff --git a/src/base/debug.hh b/src/base/debug.hh
index c5d3f53..4575fff 100644
--- a/src/base/debug.hh
+++ b/src/base/debug.hh
@@ -57,13 +57,13 @@
   protected:
     static bool _globalEnable; // whether debug tracings are enabled

+    bool _tracing = false; // tracing is enabled and flag is on
+
     const char *_name;
     const char *_desc;

     virtual void sync() { }

-    bool _tracing = false; // tracing is enabled and flag is on
-
   public:
     Flag(const char *name, const char *desc);
     virtual ~Flag();
@@ -71,7 +71,7 @@
     std::string name() const { return _name; }
     std::string desc() const { return _desc; }

-    bool tracing() const { return _tracing; }
+    bool tracing() const { return TRACING_ON && _tracing; }

     virtual void enable() = 0;
     virtual void disable() = 0;
@@ -150,7 +150,7 @@
  * @ingroup api_trace
  * @{
  */
-#define DTRACE(x) (TRACING_ON && Debug::x)
+#define DTRACE(x) (Debug::x)
 /** @} */ // end of api_trace

 #endif // __BASE_DEBUG_HH__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45008
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Icda18ff57126328e98e440e3a81bf13caa0c27df
Gerrit-Change-Number: 45008
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to