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

Brian Gaeke gaeke at cs.uiuc.edu
Tue Jun 22 03:44:04 PDT 2004


Changes in directory reopt/lib/LightWtProfiling:

RuntimeOptimizations.cpp updated: 1.42 -> 1.43

---
Log message:

Add support for skipTrace command-line option.


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

Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.42 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.43
--- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.42	Fri May 28 15:46:36 2004
+++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp	Tue Jun 22 03:43:06 2004
@@ -37,11 +37,13 @@
 
 extern bool SaveStateToModule;
 extern bool SaveRegAllocState;
+static int TraceCount = 0;
+extern std::set<int> skipTrace;
 
 extern "C" void TraceOptimizerDone (uint64_t a, uint64_t traceStartAddr,
                                     uint64_t traceEndAddr) {
-  DEBUG (std::cerr << "\n*** About to return from optimizeTrace(). GDB"
-    << " commands:\n" << std::hex
+  DEBUG (std::cerr << "\n*** About to return from optimizeTrace() for trace #"
+    << TraceCount << ". GDB commands:\n" << std::hex
     << "display/i $pc\n"
     << "b *0x" << a << "\n"
     << "b *0x" << traceStartAddr << "\n"
@@ -61,7 +63,13 @@
     return;
   else
     alreadyDone.insert (a);
-
+    
+  DEBUG(++TraceCount;
+        if (skipTrace.find (TraceCount) != skipTrace.end ()) {
+          std::cerr << "optimizeTrace: skipping trace " << TraceCount << "\n";
+          return;
+        });
+  
   // Initialization stuff: ensure module has been read in, and allocate a
   // target machine, if there isn't one already.
   static TraceJIT *TJIT = 0;





More information about the llvm-commits mailing list