From: Ciro Santilli Date: Fri, 11 Oct 2019 16:01:24 +0000 (+0100) Subject: base: create DPRINTF_UNCONDITIONAL X-Git-Tag: v19.0.0.0~260 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2841aaae7e5d53cc5b634873a8d689119556c875;p=gem5.git base: create DPRINTF_UNCONDITIONAL This is similar to DPRINTFN, but it also prints a given flag to allow communicating to users which flag enabled a given log. This is useful for logs which are enabled with DTRACE instead of directly with DPRINTF. Change-Id: Ife2d2ea88aede1cdcb713f143340a8788a755b01 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22005 Tested-by: kokoro Reviewed-by: Jason Lowe-Power Reviewed-by: Bobby R. Bruce Maintainer: Jason Lowe-Power --- diff --git a/src/base/trace.hh b/src/base/trace.hh index 0fe798ec6..0b136f931 100644 --- a/src/base/trace.hh +++ b/src/base/trace.hh @@ -217,6 +217,11 @@ class Named Trace::getDebugLogger()->dprintf((Tick)-1, std::string(), __VA_ARGS__); \ } while (0) +#define DPRINTF_UNCONDITIONAL(x, ...) do { \ + Trace::getDebugLogger()->dprintf_flag( \ + curTick(), name(), #x, __VA_ARGS__); \ +} while (0) + #else // !TRACING_ON #define DTRACE(x) (false)