[llvm-commits] CVS: reopt/lib/LightWtProfiling/SecondTrigger.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Nov 9 13:41:05 PST 2004
Changes in directory reopt/lib/LightWtProfiling:
SecondTrigger.cpp updated: 1.36 -> 1.37
---
Log message:
Add some statistics.
---
Diffs of the changes: (+7 -0)
Index: reopt/lib/LightWtProfiling/SecondTrigger.cpp
diff -u reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.36 reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.37
--- reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.36 Mon Oct 4 15:15:27 2004
+++ reopt/lib/LightWtProfiling/SecondTrigger.cpp Tue Nov 9 15:40:55 2004
@@ -19,6 +19,7 @@
#include "ReoptimizerInternal.h"
#include "RegSaveRestore.h"
#include "llvm/ADT/SetVector.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Debug.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
@@ -50,6 +51,10 @@
static std::map<uint64_t, std::pair<long, long> > backOffCounters;
std::map<uint64_t, uint64_t> firstTriggerAddr;
+
+static Statistic<unsigned> FoundTraces ("reopt", "Number of traces found");
+static Statistic<unsigned> RejectedTraces ("reopt",
+ "Number of traces rejected by trace optimizer");
extern "C" void llvm_time_start(){
cpc_count_usr_events(1);
@@ -552,12 +557,14 @@
// Check whether to use the new trace optimizer which works on
// vectors of llvm basic blocks, or the old trace layout engine
// which works on SPARC instructions.
+ ++FoundTraces;
if (enable_trace_optimizer) {
//use path 0 to form vBB
std::vector<BasicBlock *> vBB;
constructFullVBB (paths, start, vBB);
if (vBB.empty()) return;
if (!optimizeTrace (vBB, firstLevelTraceStartAddr)) {
+ ++RejectedTraces;
// give up.
tr->patchTrace(firstLevelTraceStartAddr);
vm->writeBranchInstruction(firstLevelTraceStartAddr, start);
More information about the llvm-commits
mailing list