summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2009-01-23 17:19:48 -0500
committerAli Saidi <saidi@eecs.umich.edu>2009-01-23 17:19:48 -0500
commit56d5212ba7a3588feb8ce0ed5d3a31c704106730 (patch)
tree976a1be34885ecc521d81c20f9cab69e900a99a5 /src/base
parent37ffe52ca406405ad42f9444286a7d1deef29a9c (diff)
downloadgem5-56d5212ba7a3588feb8ce0ed5d3a31c704106730.tar.xz
Trace: Add DPRINTFS macro that takes parameter to call name() for trace printing.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/trace.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/base/trace.hh b/src/base/trace.hh
index 72d7ba605..fa24e9c48 100644
--- a/src/base/trace.hh
+++ b/src/base/trace.hh
@@ -97,6 +97,12 @@ inline const std::string &name() { return Trace::DefaultName; }
Trace::dprintf(curTick, name(), __VA_ARGS__); \
} while (0)
+#define DPRINTFS(x,s, ...) do { \
+ if (DTRACE(x)) \
+ Trace::dprintf(curTick, s->name(), __VA_ARGS__); \
+} while (0)
+
+
#define DPRINTFR(x, ...) do { \
if (DTRACE(x)) \
Trace::dprintf((Tick)-1, std::string(), __VA_ARGS__); \
@@ -119,6 +125,7 @@ inline const std::string &name() { return Trace::DefaultName; }
#define DTRACE(x) (false)
#define DDUMP(x, data, count) do {} while (0)
#define DPRINTF(x, ...) do {} while (0)
+#define DPRINTFS(x, ...) do {} while (0)
#define DPRINTFR(...) do {} while (0)
#define DDUMPN(data, count) do {} while (0)
#define DPRINTFN(...) do {} while (0)