From 3e689021a2f28e999aec5581862e42f51c19179a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 29 Apr 2021 21:31:26 -0700 Subject: [PATCH] base: Collapse the DTRACE macro in DPRINTF. We've already checked if TRACING_ON is set, so we can just check the value of Debug::x directly. Change-Id: Ifcc183b9e56fd45a2c6278ab5739ae2fbe2b32c0 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45005 Tested-by: kokoro Maintainer: Gabe Black Reviewed-by: Daniel Carvalho Reviewed-by: Bobby R. Bruce --- src/base/trace.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/base/trace.hh b/src/base/trace.hh index fec9822fe8..c1804e8fed 100644 --- a/src/base/trace.hh +++ b/src/base/trace.hh @@ -174,27 +174,27 @@ const std::string &name(); */ #define DDUMP(x, data, count) do { \ - if (M5_UNLIKELY(TRACING_ON && DTRACE(x))) \ + if (M5_UNLIKELY(TRACING_ON && Debug::x)) \ Trace::getDebugLogger()->dump( \ curTick(), name(), data, count, #x); \ } while (0) #define DPRINTF(x, ...) do { \ - if (M5_UNLIKELY(TRACING_ON && DTRACE(x))) { \ + if (M5_UNLIKELY(TRACING_ON && Debug::x)) { \ Trace::getDebugLogger()->dprintf_flag( \ curTick(), name(), #x, __VA_ARGS__); \ } \ } while (0) #define DPRINTFS(x, s, ...) do { \ - if (M5_UNLIKELY(TRACING_ON && DTRACE(x))) { \ + if (M5_UNLIKELY(TRACING_ON && Debug::x)) { \ Trace::getDebugLogger()->dprintf_flag( \ curTick(), s->name(), #x, __VA_ARGS__); \ } \ } while (0) #define DPRINTFR(x, ...) do { \ - if (M5_UNLIKELY(TRACING_ON && DTRACE(x))) { \ + if (M5_UNLIKELY(TRACING_ON && Debug::x)) { \ Trace::getDebugLogger()->dprintf_flag( \ (Tick)-1, std::string(), #x, __VA_ARGS__); \ } \