From 2bbd2b9596478c78eb7b0bfd9af825a30f3cea56 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Mon, 20 Mar 2023 12:57:11 +0000 Subject: [PATCH] base: Remove unnecessary DEBUG guard There is no performance improvement on guarding a cprint before a panic. We should just print as many info as possible anytime we encounter a failure Change-Id: I3ee9fb2c3b8a8f23bdf6173bb2a010020f2b2572 Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69077 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Reviewed-by: Daniel Carvalho Tested-by: kokoro --- src/base/stats/info.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/base/stats/info.cc b/src/base/stats/info.cc index 06e7ec977d..8779cf0081 100644 --- a/src/base/stats/info.cc +++ b/src/base/stats/info.cc @@ -172,13 +172,11 @@ bool Info::baseCheck() const { if (!(flags & statistics::init)) { -#ifdef DEBUG - cprintf("this is stat number %d\n", id); -#endif - panic("Not all stats have been initialized.\n" + panic("this is stat number %d\n" + "Not all stats have been initialized.\n" "You may need to add ::regStats() to a" " new SimObject's regStats() function. Name: %s", - name); + id, name); return false; }