[llvm-commits] CVS: reopt/lib/LightWtProfiling/TraceOptEmitter.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Fri Apr 23 14:43:02 PDT 2004


Changes in directory reopt/lib/LightWtProfiling:

TraceOptEmitter.cpp updated: 1.4 -> 1.5

---
Log message:

Use the doFlush() utility to try to make sure that bytes are actually
written to the address space. This is what the other Reoptimizer components
do, so it probably works... we'll find out.


---
Diffs of the changes:  (+3 -0)

Index: reopt/lib/LightWtProfiling/TraceOptEmitter.cpp
diff -u reopt/lib/LightWtProfiling/TraceOptEmitter.cpp:1.4 reopt/lib/LightWtProfiling/TraceOptEmitter.cpp:1.5
--- reopt/lib/LightWtProfiling/TraceOptEmitter.cpp:1.4	Fri Apr 23 12:11:41 2004
+++ reopt/lib/LightWtProfiling/TraceOptEmitter.cpp	Fri Apr 23 14:42:30 2004
@@ -23,6 +23,7 @@
 
 #include "reopt/ScratchMemory.h"
 #include "reopt/VirtualMem.h"
+#include "reopt/InstrUtils.h"
 #include "ReoptimizerInternal.h"
 #include "llvm/Constant.h"
 #include "llvm/Module.h"
@@ -164,6 +165,7 @@
             << " at cursor: " << (uint64_t)(uintptr_t)CurByte << std::dec
             << "\n";
   vm->writeInstToVM (W, (uint64_t) CurByte);  // does: *(unsigned*)CurByte = W;
+  doFlush ((uint64_t) CurByte, (uint64_t) CurByte + sizeof (unsigned));
   CurByte += sizeof(unsigned);
 }
 
@@ -171,6 +173,7 @@
   std::cerr << "TraceOptEmitter: emitting word 0x" << std::hex << W
             << std::dec << " at pointer: " << Ptr << "\n";
   vm->writeInstToVM (W, (uint64_t) Ptr);  // does: *Ptr = W;
+  doFlush ((uint64_t) Ptr, (uint64_t) Ptr + sizeof (unsigned));
 }
 
 uint64_t TraceOptEmitter::getGlobalValueAddress(GlobalValue *V) {





More information about the llvm-commits mailing list