changeset b5baf1dc44b4 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=b5baf1dc44b4
description:
ruby: Added Cache and MemCntrl profiler calls
diffstat:
1 file changed, 34 insertions(+), 2 deletions(-)
src/mem/slicc/symbols/StateMachine.py | 36 +++++++++++++++++++++++++++++++--
diffs (53 lines):
diff -r a375402313df -r b5baf1dc44b4 src/mem/slicc/symbols/StateMachine.py
--- a/src/mem/slicc/symbols/StateMachine.py Fri Jan 29 20:29:23 2010 -0800
+++ b/src/mem/slicc/symbols/StateMachine.py Fri Jan 29 20:29:23 2010 -0800
@@ -233,8 +233,8 @@
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::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
''')
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev