summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-02-10 21:26:22 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2013-02-10 21:26:22 -0600
commita49b1df3f0d1e1c9ce46675d9fce7787d98caca7 (patch)
tree9c79c45ad9d0c19cff355a156f7e5ac2ee715998 /src/mem/slicc/symbols
parent10f1f8c6a49fa96ffb420eaa8cdd3641128ec9ec (diff)
downloadgem5-a49b1df3f0d1e1c9ce46675d9fce7787d98caca7.tar.xz
ruby: record fully busy cycle with in the controller
This patch does several things. First, the counter for fully busy cycles for a controller is now kept with in the controller, instead of being part of the profiler. Second, the topology class no longer keeps an array of controllers which was only used for printing stats. Instead, ruby system will now ask each controller to print the stats. Thirdly, the statistical variable for recording how many different types were created is being moved in to the controller from the profiler. Note that for printing, the profiler will collate results from different controllers.
Diffstat (limited to 'src/mem/slicc/symbols')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index c676574cc..d1e7dc147 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -663,7 +663,11 @@ $vid->setDescription("[Version " + to_string(m_version) + ", ${ident}, name=${{v
code('m_profiler.possibleTransition($state, $event);')
code.dedent()
- code('}')
+ code('''
+ AbstractController::init();
+ clearStats();
+}
+''')
has_mandatory_q = False
for port in self.in_ports:
@@ -839,6 +843,7 @@ void $c_ident::clearStats() {
code('''
m_profiler.clearStats();
+ AbstractController::clearStats();
}
''')
@@ -1047,7 +1052,7 @@ ${ident}_Controller::wakeup()
assert(counter <= m_transitions_per_cycle);
if (counter == m_transitions_per_cycle) {
// Count how often we are fully utilized
- g_system_ptr->getProfiler()->controllerBusy(m_machineID);
+ m_fully_busy_cycles++;
// Wakeup in another cycle and try again
scheduleEvent(1);