[llvm-commits] CVS: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp TraceOptEmitter.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu May 20 13:10:03 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
RuntimeOptimizations.cpp updated: 1.36 -> 1.37
TraceOptEmitter.cpp updated: 1.8 -> 1.9
---
Log message:
Put DEBUG(...) around more debugging printouts and stuff.
---
Diffs of the changes: (+8 -8)
Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.36 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.37
--- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.36 Thu May 20 12:00:45 2004
+++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Thu May 20 13:09:30 2004
@@ -71,9 +71,9 @@
extern void WriteTraceToFile (Trace &T);
extern "C" void TraceOptimizerDone (uint64_t a, uint64_t traceStartAddr) {
- std::cerr << "\n*** About to return from optimizeTrace(). GDB breakpoints:\n"
- << std::hex << "display/i $pc\n" << "b *0x" << a << "\n" << "b *0x"
- << traceStartAddr << std::dec << "\n";
+ DEBUG (std::cerr << "\n*** About to return from optimizeTrace(). GDB"
+ << " breakpoints:\n" << std::hex << "display/i $pc\n" << "b *0x" << a
+ << "\n" << "b *0x" << traceStartAddr << std::dec << "\n");
}
/// This method is called when we have finally constructed a
@@ -100,7 +100,7 @@
// Turn the vector of basic blocks into a Trace, and then turn the Trace into
// a TraceFunction.
Trace T (vBB);
- WriteTraceToFile (T);
+ DEBUG (WriteTraceToFile (T));
TraceFunction *TF = TraceFunction::get (T);
// Force the SPARCv9 register allocator to save its state into a global
Index: reopt/lib/LightWtProfiling/TraceOptEmitter.cpp
diff -u reopt/lib/LightWtProfiling/TraceOptEmitter.cpp:1.8 reopt/lib/LightWtProfiling/TraceOptEmitter.cpp:1.9
--- reopt/lib/LightWtProfiling/TraceOptEmitter.cpp:1.8 Wed Apr 28 16:41:09 2004
+++ reopt/lib/LightWtProfiling/TraceOptEmitter.cpp Thu May 20 13:09:30 2004
@@ -166,16 +166,16 @@
void TraceOptEmitter::emitWord(unsigned W) {
// This won't work if the endianness of the host and target don't agree! (For
// a JIT this can't happen though. :)
- std::cerr << "TraceOptEmitter: emitting word 0x" << std::hex << W
- << " at cursor: " << CurByte << std::dec << "\n";
+ DEBUG (std::cerr << "TraceOptEmitter: emitting word 0x" << std::hex << W
+ << " at cursor: " << CurByte << std::dec << "\n");
vm->writeInstToVM (CurByte, W); // does: *(unsigned*)CurByte = W;
doFlush (CurByte - sizeof (unsigned), (uint64_t) CurByte + sizeof (unsigned));
CurByte += sizeof(unsigned);
}
void TraceOptEmitter::emitWordAt(unsigned W, unsigned *Ptr) {
- std::cerr << "TraceOptEmitter: emitting word 0x" << std::hex << W
- << std::dec << " at pointer: " << Ptr << "\n";
+ DEBUG (std::cerr << "TraceOptEmitter: emitting word 0x" << std::hex << W
+ << std::dec << " at pointer: " << Ptr << "\n");
vm->writeInstToVM ((uint64_t) Ptr, W); // does: *Ptr = W;
doFlush ((uint64_t) Ptr - sizeof (unsigned), (uint64_t) Ptr + sizeof (unsigned));
}
More information about the llvm-commits
mailing list