summaryrefslogtreecommitdiff
path: root/src/mem/slicc
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:23 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:23 -0800
commit3a835c7cbb481808a46a0491cf23b29378c0f866 (patch)
tree4686fe1e0d03f360666af31aa017218048de8e8f /src/mem/slicc
parent47502163b778c079009238f145dd095adb2bccf2 (diff)
downloadgem5-3a835c7cbb481808a46a0491cf23b29378c0f866.tar.xz
ruby: Added Cache and MemCntrl profiler calls
Diffstat (limited to 'src/mem/slicc')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py36
1 files changed, 34 insertions, 2 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 4f25f68e9..cf53e8398 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -233,8 +233,8 @@ public:
void print(ostream& out) const;
void printConfig(ostream& out) const;
void wakeup();
- void printStats(ostream& out) const { s_profiler.dumpStats(out); }
- void clearStats() { s_profiler.clearStats(); }
+ void printStats(ostream& out) const;
+ void clearStats();
void blockOnQueue(Address addr, MessageBuffer* port);
void unblock(Address addr);
private:
@@ -587,6 +587,38 @@ void $c_ident::printConfig(ostream& out) const {
}
}
+void $c_ident::printStats(ostream& out) const {
+''')
+ #
+ # Cache and Memory Controllers have specific profilers associated with
+ # them. Print out these stats before dumping state transition stats.
+ #
+ for param in self.config_parameters:
+ if param.type_ast.type.ident == "CacheMemory" or \
+ param.type_ast.type.ident == "MemoryControl":
+ assert(param.pointer)
+ code(' m_${{param.ident}}_ptr->printStats(out);')
+
+ code('''
+ s_profiler.dumpStats(out);
+}
+
+void $c_ident::clearStats() {
+''')
+ #
+ # Cache and Memory Controllers have specific profilers associated with
+ # them. These stats must be cleared too.
+ #
+ for param in self.config_parameters:
+ if param.type_ast.type.ident == "CacheMemory" or \
+ param.type_ast.type.ident == "MemoryControl":
+ assert(param.pointer)
+ code(' m_${{param.ident}}_ptr->clearStats();')
+
+ code('''
+ s_profiler.clearStats();
+}
+
// Actions
''')