[llvm-commits] CVS: reopt/lib/TraceCache/InstrUtils.cpp VirtualMem.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Mon May 17 15:57:04 PDT 2004
Changes in directory reopt/lib/TraceCache:
InstrUtils.cpp updated: 1.18 -> 1.19
VirtualMem.cpp updated: 1.17 -> 1.18
---
Log message:
Add debug printouts to doFlush and VirtualMem's write methods
---
Diffs of the changes: (+7 -0)
Index: reopt/lib/TraceCache/InstrUtils.cpp
diff -u reopt/lib/TraceCache/InstrUtils.cpp:1.18 reopt/lib/TraceCache/InstrUtils.cpp:1.19
--- reopt/lib/TraceCache/InstrUtils.cpp:1.18 Mon Apr 26 15:02:59 2004
+++ reopt/lib/TraceCache/InstrUtils.cpp Mon May 17 15:56:09 2004
@@ -6,6 +6,7 @@
//===----------------------------------------------------------------------===//
#include "reopt/InstrUtils.h"
+#include "Support/Debug.h"
#include <cassert>
#include <iostream>
@@ -201,6 +202,7 @@
}
void doFlush(uint64_t st_addr, uint64_t end_addr){
+ DEBUG (std::cerr << "doFlush(" << st_addr << ", " << end_addr << ")\n");
#ifdef __sparc__
if(st_addr % 8 != 0)
st_addr &= ~7; // Round down to the next lower doubleword boundary
Index: reopt/lib/TraceCache/VirtualMem.cpp
diff -u reopt/lib/TraceCache/VirtualMem.cpp:1.17 reopt/lib/TraceCache/VirtualMem.cpp:1.18
--- reopt/lib/TraceCache/VirtualMem.cpp:1.17 Mon Apr 26 14:49:59 2004
+++ reopt/lib/TraceCache/VirtualMem.cpp Mon May 17 15:56:09 2004
@@ -9,6 +9,7 @@
#include "reopt/InstrUtils.h"
#include "reopt/TraceCache.h"
#include "reopt/GetTraceTime.h"
+#include "Support/Debug.h"
#include <cassert>
#include <string>
#include <cstdio>
@@ -54,6 +55,8 @@
/// writeInstToVM - Emit the word newInstr to memory at address destAddr.
///
void VirtualMem::writeInstToVM (uint64_t destAddr, unsigned int newInstr) {
+ DEBUG (std::cerr << "writeInstToVM (" << std::hex << destAddr << ", "
+ << newInstr << ");\n" << std::dec);
lseek (fp, destAddr, SEEK_SET);
write (fp, &newInstr, sizeof (unsigned int));
}
@@ -63,6 +66,8 @@
///
void VirtualMem::writeTraceToVM (uint64_t destAddr,
std::vector<unsigned int> &newInstrs) {
+ DEBUG (std::cerr << "writeTraceToVM ("<<std::hex << destAddr << ", ["
+ << std::dec << newInstrs.size() << " instrs]);\n");
lseek (fp, destAddr, SEEK_SET);
write (fp, &newInstrs[0], newInstrs.size () * sizeof (unsigned int));
}
More information about the llvm-commits
mailing list