Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45006 )
Change subject: base: Simplify the definition of DTRACE.
......................................................................
base: Simplify the definition of DTRACE.
Instead of gating the behavior of DTRACE based on TRACING_ON in the
preprocessor, move it to C++. Beyond being a little simpler, this
ensures that the value of Debug::x is always valid (the proper header is
included, x is spelled correctly, etc) even if TRACING_ON is false.
Change-Id: Ie0085c0f8753ad5283ef1850d493706b977c21a8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45006
Tested-by: kokoro <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M src/base/debug.hh
1 file changed, 1 insertion(+), 5 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, approved
Jason Lowe-Power: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/debug.hh b/src/base/debug.hh
index 38d92f9..4b77e16 100644
--- a/src/base/debug.hh
+++ b/src/base/debug.hh
@@ -151,11 +151,7 @@
* @ingroup api_trace
* @{
*/
-#if TRACING_ON
-# define DTRACE(x) (Debug::x)
-#else // !TRACING_ON
-# define DTRACE(x) (false)
-#endif // TRACING_ON
+#define DTRACE(x) (TRACING_ON && Debug::x)
/** @} */ // end of api_trace
#endif // __BASE_DEBUG_HH__
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45006
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: Ie0085c0f8753ad5283ef1850d493706b977c21a8
Gerrit-Change-Number: 45006
Gerrit-PatchSet: 8
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s