summaryrefslogtreecommitdiff
path: root/base/trace.cc
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-07-30 10:18:04 -0400
committerNathan Binkert <binkertn@umich.edu>2004-07-30 10:18:04 -0400
commit41988a86b56984e19e9ef45991a39c00fdb3f21e (patch)
treebdbf0abd4c0898cbfaae887c9b9fcb27f2677ccf /base/trace.cc
parentb1fa4e9f0a687f8005ab0ba3cbfb5f4e6fb0172f (diff)
downloadgem5-41988a86b56984e19e9ef45991a39c00fdb3f21e.tar.xz
Make the DDUMP tracing feature output the cycle number and
the object name on every line. This makes grep a bit more effective. kern/tru64/dump_mbuf.cc: use the new data dump format that trace.hh now provides --HG-- extra : convert_revision : 179efa96aaff9da710baae13c9e981975d2abdc1
Diffstat (limited to 'base/trace.cc')
-rw-r--r--base/trace.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/base/trace.cc b/base/trace.cc
index aa82ee403..d924b9a4b 100644
--- a/base/trace.cc
+++ b/base/trace.cc
@@ -184,7 +184,6 @@ PrintfRecord::~PrintfRecord()
delete &args;
}
-
void
PrintfRecord::dump(ostream &os)
{
@@ -206,29 +205,26 @@ PrintfRecord::dump(ostream &os)
os.flush();
}
-
-
-RawDataRecord::RawDataRecord(Tick _cycle, const void *_data, int _len)
- : Record(_cycle), len(_len)
+DataRecord::DataRecord(Tick _cycle, const string &_name,
+ const void *_data, int _len)
+ : Record(_cycle), name(_name), len(_len)
{
data = new uint8_t[len];
memcpy(data, _data, len);
}
-
-RawDataRecord::~RawDataRecord()
+DataRecord::~DataRecord()
{
delete [] data;
}
-
void
-RawDataRecord::dump(ostream &os)
+DataRecord::dump(ostream &os)
{
int c, i, j;
for (i = 0; i < len; i += 16) {
- ccprintf(os, "%08x ", i);
+ ccprintf(os, "%d: %s: %08x ", cycle, name, i);
c = len - i;
if (c > 16) c = 16;