summaryrefslogtreecommitdiff
path: root/src/mem/ruby/profiler
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-01-14 10:04:21 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2013-01-14 10:04:21 -0600
commitcf232de4615f0fe9435d6e92a1d6319c972a8c88 (patch)
tree539c365baf0b078b2fdbf820feeb89c1afee8726 /src/mem/ruby/profiler
parentcbbc4c7f6b4cb718cc3907b955f7ae527d2d0274 (diff)
downloadgem5-cf232de4615f0fe9435d6e92a1d6319c972a8c88.tar.xz
Ruby: use ClockedObject in Consumer class
Many Ruby structures inherit from the Consumer, which is used for scheduling events. The Consumer used to relay on an Event Manager for scheduling events and on g_system_ptr for time. With this patch, the Consumer will now use a ClockedObject to schedule events and to query for current time. This resulted in several structures being converted from SimObjects to ClockedObjects. Also, the MessageBuffer class now requires a pointer to a ClockedObject so as to query for time.
Diffstat (limited to 'src/mem/ruby/profiler')
-rw-r--r--src/mem/ruby/profiler/Profiler.cc4
-rw-r--r--src/mem/ruby/profiler/Profiler.hh2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/ruby/profiler/Profiler.cc b/src/mem/ruby/profiler/Profiler.cc
index 9f5fb4fd9..9a01ce45a 100644
--- a/src/mem/ruby/profiler/Profiler.cc
+++ b/src/mem/ruby/profiler/Profiler.cc
@@ -137,7 +137,7 @@ Profiler::wakeup()
}
//g_system_ptr->getNetwork()->printStats(out);
- schedule(m_event, g_system_ptr->clockEdge(Cycles(m_stats_period )));
+ schedule(m_event, g_system_ptr->clockEdge(Cycles(m_stats_period)));
}
void
@@ -571,7 +571,7 @@ Profiler::profileSharing(const Address& addr, AccessType type,
}
void
-Profiler::profileMsgDelay(int virtualNetwork, int delayCycles)
+Profiler::profileMsgDelay(uint32_t virtualNetwork, Time delayCycles)
{
assert(virtualNetwork < m_delayedCyclesVCHistograms.size());
m_delayedCyclesHistogram.add(delayCycles);
diff --git a/src/mem/ruby/profiler/Profiler.hh b/src/mem/ruby/profiler/Profiler.hh
index c83c4e37a..5f78f279b 100644
--- a/src/mem/ruby/profiler/Profiler.hh
+++ b/src/mem/ruby/profiler/Profiler.hh
@@ -152,7 +152,7 @@ class Profiler : public SimObject
void sequencerRequests(int num) { m_sequencer_requests.add(num); }
- void profileMsgDelay(int virtualNetwork, int delayCycles);
+ void profileMsgDelay(uint32_t virtualNetwork, Time delayCycles);
void print(std::ostream& out) const;