summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/SparseMemory.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-09-06 16:21:28 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2013-09-06 16:21:28 -0500
commitc0a8ad0a35cc273f494c9460277dcb13268baccc (patch)
treee9b26b72372b96d8b6dd5e92829f07ab11383b95 /src/mem/ruby/system/SparseMemory.hh
parent53cf77cf18fa44ed60ad586fb9add661853b205a (diff)
downloadgem5-c0a8ad0a35cc273f494c9460277dcb13268baccc.tar.xz
ruby: converts sparse memory stats to gem5 style
Diffstat (limited to 'src/mem/ruby/system/SparseMemory.hh')
-rw-r--r--src/mem/ruby/system/SparseMemory.hh17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mem/ruby/system/SparseMemory.hh b/src/mem/ruby/system/SparseMemory.hh
index 143ed5c1e..65e0ae8ad 100644
--- a/src/mem/ruby/system/SparseMemory.hh
+++ b/src/mem/ruby/system/SparseMemory.hh
@@ -31,8 +31,10 @@
#define __MEM_RUBY_SYSTEM_SPARSEMEMORY_HH__
#include <iostream>
+#include <string>
#include "base/hashmap.hh"
+#include "base/statistics.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/recorder/CacheRecorder.hh"
#include "mem/ruby/slicc_interface/AbstractEntry.hh"
@@ -67,14 +69,9 @@ class SparseMemory
void recordBlocks(int cntrl_id, CacheRecorder *) const;
AbstractEntry* lookup(const Address& address);
-
- // Print cache contents
- void print(std::ostream& out) const;
- void printStats(std::ostream& out) const;
+ void regStats(const std::string &name);
private:
- // Private Methods
-
// Private copy constructor and assignment operator
SparseMemory(const SparseMemory& obj);
SparseMemory& operator=(const SparseMemory& obj);
@@ -92,10 +89,10 @@ class SparseMemory
int m_number_of_levels;
int* m_number_of_bits_per_level;
- uint64_t m_total_adds;
- uint64_t m_total_removes;
- uint64_t* m_adds_per_level;
- uint64_t* m_removes_per_level;
+ Stats::Scalar m_total_adds;
+ Stats::Vector m_adds_per_level;
+ Stats::Scalar m_total_removes;
+ Stats::Vector m_removes_per_level;
};
#endif // __MEM_RUBY_SYSTEM_SPARSEMEMORY_HH__