[llvm-commits] CVS: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Mon Aug 18 15:35:01 PDT 2003
Changes in directory llvm/lib/Reoptimizer/LightWtProfiling/Trigger:
FirstTrigger.cpp updated: 1.12 -> 1.13
---
Log message:
Include Support/Debug.h.
Turn #ifdef GET_ALL_INFO...#endif into DEBUG(...).
---
Diffs of the changes:
Index: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp
diff -u llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp:1.12 llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp:1.13
--- llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp:1.12 Tue Aug 12 22:34:55 2003
+++ llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp Mon Aug 18 15:33:21 2003
@@ -15,6 +15,7 @@
#include "scheduler.h"
#include "SLI.h"
#include "Timer.h"
+#include "Support/Debug.h"
#include "llvm/Reoptimizer/VirtualMem.h"
#include "llvm/Reoptimizer/InstrUtils.h"
#include "llvm/Reoptimizer/TraceCache.h"
@@ -56,8 +57,8 @@
// THRESHOLD_LEVEL_1. If it exceeds the threshold, we may have to
// generate second-level instrumentation (SLI).
if(++counterMap[pcAddr] > reopt_threshold){
+ // Reset the counter.
counterMap.erase(pcAddr);
- //std::cerr<<"Originally Removed from addr: "<<(void *)pcAddr<<"\n";
// Scan forward through memory starting from pcAddr+8 looking for
// a branch instruction. The first one we find should be the
@@ -75,9 +76,10 @@
// No optimized code in trace cache; generate SLI now.
doInstrumentation(brTarget, branchAddr, vm);
} else {
-#ifdef GET_ALL_INFO
- std::cerr<<"SLI-exists\t"<<(void *)brTarget<<"\t"<<(void *)branchAddr<<"\n";
-#endif
+ DEBUG(std::cerr << "SLI already exists for this branch: target = "
+ << (void *)brTarget << ", branch addr = " << (void *)branchAddr
+ << "\n");
+
// Write a branch going to the top of the trace in tr.
uint64_t traceAddrInTC = tr->getStartAddr(brTarget);
More information about the llvm-commits
mailing list