summaryrefslogtreecommitdiff
path: root/src/mem/ruby/profiler/MemCntrlProfiler.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-06-09 07:29:59 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2013-06-09 07:29:59 -0500
commitf59a7af50a7309944abfe1997057f52591619635 (patch)
tree4daa578b6ba1664152da4412786317bce26ff0ee /src/mem/ruby/profiler/MemCntrlProfiler.hh
parent38736ce7c33d7b1bf1e982f5d8cacd13908a32f4 (diff)
downloadgem5-f59a7af50a7309944abfe1997057f52591619635.tar.xz
ruby: stats: use gem5's stats for cache and memory controllers
This moves event and transition count statistics for cache controllers to gem5's statistics. It does the same for the statistics associated with the memory controller in ruby. All the cache/directory/dma controllers individually collect the event and transition counts. A callback function, collateStats(), has been added that is invoked on the controller version 0 of each controller class. This function adds all the individual controller statistics to a vector variables. All the code for registering the statistical variables and collating them is generated by SLICC. The patch removes the files *_Profiler.{cc,hh} and *_ProfileDumper.{cc,hh} which were earlier used for collecting and dumping statistics respectively.
Diffstat (limited to 'src/mem/ruby/profiler/MemCntrlProfiler.hh')
-rw-r--r--src/mem/ruby/profiler/MemCntrlProfiler.hh41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/mem/ruby/profiler/MemCntrlProfiler.hh b/src/mem/ruby/profiler/MemCntrlProfiler.hh
index a594e0d96..56e283f50 100644
--- a/src/mem/ruby/profiler/MemCntrlProfiler.hh
+++ b/src/mem/ruby/profiler/MemCntrlProfiler.hh
@@ -33,6 +33,7 @@
#include <string>
#include <vector>
+#include "base/statistics.hh"
#include "mem/ruby/common/TypeDefines.hh"
class MemCntrlProfiler
@@ -42,8 +43,7 @@ class MemCntrlProfiler
int ranks_per_dimm, int dimms_per_channel);
~MemCntrlProfiler();
- void printStats(std::ostream& out) const;
- void clearStats();
+ void regStats();
void profileMemReq(int bank);
void profileMemBankBusy();
@@ -69,22 +69,27 @@ private:
MemCntrlProfiler& operator=(const MemCntrlProfiler& obj);
std::string m_description;
- uint64 m_memReq;
- uint64 m_memBankBusy;
- uint64 m_memBusBusy;
- uint64 m_memTfawBusy;
- uint64 m_memReadWriteBusy;
- uint64 m_memDataBusBusy;
- uint64 m_memRefresh;
- uint64 m_memRead;
- uint64 m_memWrite;
- uint64 m_memWaitCycles;
- uint64 m_memInputQ;
- uint64 m_memBankQ;
- uint64 m_memArbWait;
- uint64 m_memRandBusy;
- uint64 m_memNotOld;
- std::vector<uint64> m_memBankCount;
+ Stats::Scalar m_memReq;
+ Stats::Scalar m_memRead;
+ Stats::Scalar m_memWrite;
+ Stats::Scalar m_memRefresh;
+
+ Stats::Scalar m_memWaitCycles;
+ Stats::Scalar m_memInputQ;
+ Stats::Scalar m_memBankQ;
+ Stats::Formula m_totalStalls;
+ Stats::Formula m_stallsPerReq;
+
+ Stats::Scalar m_memBankBusy;
+ Stats::Scalar m_memBusBusy;
+ Stats::Scalar m_memTfawBusy;
+ Stats::Scalar m_memReadWriteBusy;
+ Stats::Scalar m_memDataBusBusy;
+ Stats::Scalar m_memArbWait;
+ Stats::Scalar m_memRandBusy;
+ Stats::Scalar m_memNotOld;
+ Stats::Vector m_memBankCount;
+
int m_banks_per_rank;
int m_ranks_per_dimm;
int m_dimms_per_channel;