diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2014-01-10 16:19:47 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2014-01-10 16:19:47 -0600 |
commit | 407f37e15f19a2da350a94272ac7739891e935f4 (patch) | |
tree | db413665cc1d2fc411b960339e1653cce0e182e8 /src/mem/slicc | |
parent | cfe912a5127b51273d7e3e78c15095ac832f20bd (diff) | |
download | gem5-407f37e15f19a2da350a94272ac7739891e935f4.tar.xz |
ruby: move all statistics to stats.txt, eliminate ruby.stats
Diffstat (limited to 'src/mem/slicc')
-rw-r--r-- | src/mem/slicc/symbols/StateMachine.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py index 89bb5dc0a..679d15f97 100644 --- a/src/mem/slicc/symbols/StateMachine.py +++ b/src/mem/slicc/symbols/StateMachine.py @@ -257,7 +257,7 @@ class $c_ident : public AbstractController void print(std::ostream& out) const; void wakeup(); - void clearStats(); + void resetStats(); void regStats(); void collateStats(); @@ -690,7 +690,7 @@ $vid->setDescription("[Version " + to_string(m_version) + ", ${ident}, name=${{v code.dedent() code(''' AbstractController::init(); - clearStats(); + resetStats(); } ''') @@ -715,12 +715,15 @@ $vid->setDescription("[Version " + to_string(m_version) + ", ${ident}, name=${{v void $c_ident::regStats() { + AbstractController::regStats(); + if (m_version == 0) { for (${ident}_Event event = ${ident}_Event_FIRST; event < ${ident}_Event_NUM; ++event) { Stats::Vector *t = new Stats::Vector(); t->init(m_num_controllers); - t->name(name() + "." + ${ident}_Event_to_string(event)); + t->name(g_system_ptr->name() + ".${c_ident}." + + ${ident}_Event_to_string(event)); t->flags(Stats::pdf | Stats::total | Stats::oneline | Stats::nozero); @@ -737,7 +740,8 @@ $c_ident::regStats() Stats::Vector *t = new Stats::Vector(); t->init(m_num_controllers); - t->name(name() + "." + ${ident}_State_to_string(state) + + t->name(g_system_ptr->name() + ".${c_ident}." + + ${ident}_State_to_string(state) + "." + ${ident}_Event_to_string(event)); t->flags(Stats::pdf | Stats::total | Stats::oneline | @@ -842,7 +846,7 @@ $c_ident::print(ostream& out) const out << "[$c_ident " << m_version << "]"; } -void $c_ident::clearStats() +void $c_ident::resetStats() { for (int state = 0; state < ${ident}_State_NUM; state++) { for (int event = 0; event < ${ident}_Event_NUM; event++) { @@ -854,7 +858,7 @@ void $c_ident::clearStats() m_event_counters[event] = 0; } - AbstractController::clearStats(); + AbstractController::resetStats(); } ''') |