summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-03-22 15:53:25 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2013-03-22 15:53:25 -0500
commit89bb8260790442ab1260099a95cfcfa2c17f2cb0 (patch)
tree3147c994adde1499b3bc970e28f09b252dae08f2 /src/mem/ruby/system
parent870d54578897a099128d446ddc5801e556f93056 (diff)
downloadgem5-89bb8260790442ab1260099a95cfcfa2c17f2cb0.tar.xz
ruby: keep histogram of outstanding requests in seq
The histogram for tracking outstanding counts per cycle is maintained in the profiler. For a parallel implementation of the memory system, we need that this histogram is maintained locally. Hence it will now be kept in the sequencer itself. The resulting histograms will be merged when the stats are printed.
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r--src/mem/ruby/system/Sequencer.cc7
-rw-r--r--src/mem/ruby/system/Sequencer.hh21
2 files changed, 17 insertions, 11 deletions
diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc
index 54fb83dd0..5eacc976a 100644
--- a/src/mem/ruby/system/Sequencer.cc
+++ b/src/mem/ruby/system/Sequencer.cc
@@ -133,6 +133,11 @@ Sequencer::wakeup()
}
}
+void Sequencer::clearStats()
+{
+ m_outstandReqHist.clear();
+}
+
void
Sequencer::printStats(ostream & out) const
{
@@ -268,7 +273,7 @@ Sequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type)
}
}
- g_system_ptr->getProfiler()->sequencerRequests(m_outstanding_count);
+ m_outstandReqHist.add(m_outstanding_count);
assert(m_outstanding_count ==
(m_writeRequestTable.size() + m_readRequestTable.size()));
diff --git a/src/mem/ruby/system/Sequencer.hh b/src/mem/ruby/system/Sequencer.hh
index 782b776f9..058edb9ce 100644
--- a/src/mem/ruby/system/Sequencer.hh
+++ b/src/mem/ruby/system/Sequencer.hh
@@ -68,6 +68,8 @@ class Sequencer : public RubyPort
void printProgress(std::ostream& out) const;
+ void clearStats();
+
void writeCallback(const Address& address, DataBlock& data);
void writeCallback(const Address& address,
@@ -97,17 +99,12 @@ class Sequencer : public RubyPort
RequestStatus makeRequest(PacketPtr pkt);
bool empty() const;
int outstandingCount() const { return m_outstanding_count; }
- bool
- isDeadlockEventScheduled() const
- {
- return deadlockCheckEvent.scheduled();
- }
- void
- descheduleDeadlockEvent()
- {
- deschedule(deadlockCheckEvent);
- }
+ bool isDeadlockEventScheduled() const
+ { return deadlockCheckEvent.scheduled(); }
+
+ void descheduleDeadlockEvent()
+ { deschedule(deadlockCheckEvent); }
void print(std::ostream& out) const;
void printStats(std::ostream& out) const;
@@ -119,6 +116,7 @@ class Sequencer : public RubyPort
void invalidateSC(const Address& address);
void recordRequestType(SequencerRequestType requestType);
+ Histogram& getOutstandReqHist() { return m_outstandReqHist; }
private:
void issueRequest(PacketPtr pkt, RubyRequestType type);
@@ -160,6 +158,9 @@ class Sequencer : public RubyPort
bool m_usingNetworkTester;
+ //! Histogram for number of outstanding requests per cycle.
+ Histogram m_outstandReqHist;
+
class SequencerWakeupEvent : public Event
{
private: