• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/elements/mcniagara/CycleTracker.h

00001 
00002 #ifndef CYCLETRACKER_H
00003 #define CYCLETRACKER_H
00004 
00005 #include <McSimDefs.h>
00006 
00007 /// @brief Keeps track of cycles accumulated and the reasons for them
00008 //
00009 //
00010 class CycleTracker
00011 {
00012  public:
00013    enum CycleReason { 
00014       CPII, I_CACHE, L1_CACHE, L2_CACHE, MEMORY, 
00015       INT_DEP, INT_USE_DEP, INT_DSU_DEP, 
00016       FGU_DEP, BRANCH_MP, BRANCH_ST,
00017       P_FLUSH, STB_FULL, SPCL_LOAD, LD_STB,
00018       TLB_MISS, ITLB_MISS, NUMCYCLEREASONS
00019    };
00020    CycleTracker();
00021    ~CycleTracker();
00022    void accountForCycles(CycleCount cycles, CycleReason reason);
00023    CycleCount currentCycles();
00024    CycleCount cyclesForCategory(CycleReason reason);
00025    double cyclePercentForCategory(CycleReason reason);
00026    unsigned long long eventCountForCategory(CycleReason reason);
00027    const char* categoryName(CycleReason reason);
00028  private:
00029    static const char* cycleReasonNames[NUMCYCLEREASONS+1];
00030    CycleCount totalCycles;
00031    CycleCount *categoryCycles;
00032    unsigned long long *categoryCount;
00033 };
00034 
00035 #endif

Generated on Fri Oct 22 2010 11:02:25 for SST by  doxygen 1.7.1