diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-03-22 15:53:25 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-03-22 15:53:25 -0500 |
commit | 89bb8260790442ab1260099a95cfcfa2c17f2cb0 (patch) | |
tree | 3147c994adde1499b3bc970e28f09b252dae08f2 /src/mem/ruby/profiler/Profiler.cc | |
parent | 870d54578897a099128d446ddc5801e556f93056 (diff) | |
download | gem5-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/profiler/Profiler.cc')
-rw-r--r-- | src/mem/ruby/profiler/Profiler.cc | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/mem/ruby/profiler/Profiler.cc b/src/mem/ruby/profiler/Profiler.cc index e78e7ede5..43c658830 100644 --- a/src/mem/ruby/profiler/Profiler.cc +++ b/src/mem/ruby/profiler/Profiler.cc @@ -58,6 +58,7 @@ #include "mem/ruby/network/Network.hh" #include "mem/ruby/profiler/AddressProfiler.hh" #include "mem/ruby/profiler/Profiler.hh" +#include "mem/ruby/system/Sequencer.hh" #include "mem/ruby/system/System.hh" using namespace std; @@ -171,7 +172,7 @@ Profiler::print(ostream& out) const } void -Profiler::printRequestProfile(ostream &out) +Profiler::printRequestProfile(ostream &out) const { out << "Request vs. RubySystem State Profile" << endl; out << "--------------------------------" << endl; @@ -224,7 +225,7 @@ Profiler::printRequestProfile(ostream &out) } void -Profiler::printDelayProfile(ostream &out) +Profiler::printDelayProfile(ostream &out) const { out << "Message Delayed Cycles" << endl; out << "----------------------" << endl; @@ -256,6 +257,28 @@ Profiler::printDelayProfile(ostream &out) } void +Profiler::printOutstandingReqProfile(ostream &out) const +{ + Histogram sequencerRequests; + + for (uint32_t i = 0; i < MachineType_NUM; i++) { + for (map<uint32_t, AbstractController*>::iterator it = + g_abs_controls[i].begin(); + it != g_abs_controls[i].end(); ++it) { + + AbstractController *ctr = (*it).second; + Sequencer *seq = ctr->getSequencer(); + if (seq != NULL) { + sequencerRequests.add(seq->getOutstandReqHist()); + } + } + } + + out << "sequencer_requests_outstanding: " + << sequencerRequests << endl; +} + +void Profiler::printStats(ostream& out, bool short_stats) { out << endl; @@ -344,8 +367,7 @@ Profiler::printStats(ostream& out, bool short_stats) out << "Busy Bank Count:" << m_busyBankCount << endl; out << endl; - out << "sequencer_requests_outstanding: " - << m_sequencer_requests << endl; + printOutstandingReqProfile(out); out << endl; } @@ -548,7 +570,6 @@ Profiler::clearStats() } m_allSWPrefetchLatencyHistogram.clear(200); - m_sequencer_requests.clear(); m_read_sharing_histogram.clear(); m_write_sharing_histogram.clear(); m_all_sharing_histogram.clear(); |