From b14b43a576733af3332ca9cff97b9c00f2d9cd00 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Fri, 7 Dec 2018 11:05:55 +0000 Subject: [PATCH] mem: Compile tracePacket only when TRACING_ON is defined If TRACING_ON is not defined (e.g. when building gem5.fast), clang compilations will fail reporting an unused function. Change-Id: I959dba6e9fcf74b951e16365077939ae4d4ef924 Signed-off-by: Giacomo Travaglini Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/c/14975 Maintainer: Nikos Nikoleris --- src/mem/abstract_mem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/abstract_mem.cc b/src/mem/abstract_mem.cc index b05a99db5..581fc14cc 100644 --- a/src/mem/abstract_mem.cc +++ b/src/mem/abstract_mem.cc @@ -289,6 +289,7 @@ AbstractMemory::checkLockedAddrList(PacketPtr pkt) return allowStore; } +#if TRACING_ON static inline void tracePacket(System *sys, const char *label, PacketPtr pkt) { @@ -308,7 +309,6 @@ tracePacket(System *sys, const char *label, PacketPtr pkt) DDUMP(MemoryAccess, pkt->getConstPtr(), pkt->getSize()); } -#if TRACING_ON # define TRACE_PACKET(A) tracePacket(system(), A, pkt) #else # define TRACE_PACKET(A) -- 2.30.2