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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45008 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/compiler.hh"
|
||||
|
||||
namespace Debug {
|
||||
|
||||
void breakpoint();
|
||||
@@ -71,7 +73,7 @@ class Flag
|
||||
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 +152,7 @@ void dumpDebugFlags(std::ostream &os=std::cout);
|
||||
* @ingroup api_trace
|
||||
* @{
|
||||
*/
|
||||
#define DTRACE(x) (TRACING_ON && Debug::x)
|
||||
#define DTRACE(x) (Debug::x)
|
||||
/** @} */ // end of api_trace
|
||||
|
||||
#endif // __BASE_DEBUG_HH__
|
||||
|
||||
Reference in New Issue
Block a user