58c58
< : RubyPort(p), deadlockCheckEvent(this)
---
> : RubyPort(p), m_IncompleteTimes(MachineType_NUM), deadlockCheckEvent(this)
60,64d59
< m_store_waiting_on_load_cycles = 0;
< m_store_waiting_on_store_cycles = 0;
< m_load_waiting_on_store_cycles = 0;
< m_load_waiting_on_load_cycles = 0;
<
136c131
< void Sequencer::clearStats()
---
> void Sequencer::resetStats()
138,142c133,135
< m_outstandReqHist.clear();
<
< // Initialize the histograms that track latency of all requests
< m_latencyHist.clear(20);
< m_typeLatencyHist.resize(RubyRequestType_NUM);
---
> m_latencyHist.reset();
> m_hitLatencyHist.reset();
> m_missLatencyHist.reset();
144,155c137,139
< m_typeLatencyHist[i].clear(20);
< }
<
< // Initialize the histograms that track latency of requests that
< // hit in the cache attached to the sequencer.
< m_hitLatencyHist.clear(20);
< m_hitTypeLatencyHist.resize(RubyRequestType_NUM);
< m_hitTypeMachLatencyHist.resize(RubyRequestType_NUM);
<
< for (int i = 0; i < RubyRequestType_NUM; i++) {
< m_hitTypeLatencyHist[i].clear(20);
< m_hitTypeMachLatencyHist[i].resize(MachineType_NUM);
---
> m_typeLatencyHist[i]->reset();
> m_hitTypeLatencyHist[i]->reset();
> m_missTypeLatencyHist[i]->reset();
157c141,142
< m_hitTypeMachLatencyHist[i][j].clear(20);
---
> m_hitTypeMachLatencyHist[i][j]->reset();
> m_missTypeMachLatencyHist[i][j]->reset();
161,182d145
< // Initialize the histograms that track the latency of requests that
< // missed in the cache attached to the sequencer.
< m_missLatencyHist.clear(20);
< m_missTypeLatencyHist.resize(RubyRequestType_NUM);
< m_missTypeMachLatencyHist.resize(RubyRequestType_NUM);
<
< for (int i = 0; i < RubyRequestType_NUM; i++) {
< m_missTypeLatencyHist[i].clear(20);
< m_missTypeMachLatencyHist[i].resize(MachineType_NUM);
< for (int j = 0; j < MachineType_NUM; j++) {
< m_missTypeMachLatencyHist[i][j].clear(20);
< }
< }
<
< m_hitMachLatencyHist.resize(MachineType_NUM);
< m_missMachLatencyHist.resize(MachineType_NUM);
< m_IssueToInitialDelayHist.resize(MachineType_NUM);
< m_InitialToForwardDelayHist.resize(MachineType_NUM);
< m_ForwardToFirstResponseDelayHist.resize(MachineType_NUM);
< m_FirstResponseToCompletionDelayHist.resize(MachineType_NUM);
< m_IncompleteTimes.resize(MachineType_NUM);
<
184,185c147,148
< m_missMachLatencyHist[i].clear(20);
< m_hitMachLatencyHist[i].clear(20);
---
> m_missMachLatencyHist[i]->reset();
> m_hitMachLatencyHist[i]->reset();
187,190c150,153
< m_IssueToInitialDelayHist[i].clear(20);
< m_InitialToForwardDelayHist[i].clear(20);
< m_ForwardToFirstResponseDelayHist[i].clear(20);
< m_FirstResponseToCompletionDelayHist[i].clear(20);
---
> m_IssueToInitialDelayHist[i]->reset();
> m_InitialToForwardDelayHist[i]->reset();
> m_ForwardToFirstResponseDelayHist[i]->reset();
> m_FirstResponseToCompletionDelayHist[i]->reset();
197,210d159
< Sequencer::printStats(ostream & out) const
< {
< out << "Sequencer: " << m_name << endl
< << " store_waiting_on_load_cycles: "
< << m_store_waiting_on_load_cycles << endl
< << " store_waiting_on_store_cycles: "
< << m_store_waiting_on_store_cycles << endl
< << " load_waiting_on_load_cycles: "
< << m_load_waiting_on_load_cycles << endl
< << " load_waiting_on_store_cycles: "
< << m_load_waiting_on_store_cycles << endl;
< }
<
< void
294c243
< m_store_waiting_on_load_cycles++;
---
> m_store_waiting_on_load++;
306c255
< m_store_waiting_on_store_cycles++;
---
> m_store_waiting_on_store++;
313c262
< m_load_waiting_on_store_cycles++;
---
> m_load_waiting_on_store++;
326c275
< m_load_waiting_on_load_cycles++;
---
> m_load_waiting_on_load++;
331c280
< m_outstandReqHist.add(m_outstanding_count);
---
> m_outstandReqHist.sample(m_outstanding_count);
435,436c384,385
< m_latencyHist.add(cycles);
< m_typeLatencyHist[type].add(cycles);
---
> m_latencyHist.sample(cycles);
> m_typeLatencyHist[type]->sample(cycles);
439,440c388,389
< m_missLatencyHist.add(cycles);
< m_missTypeLatencyHist[type].add(cycles);
---
> m_missLatencyHist.sample(cycles);
> m_missTypeLatencyHist[type]->sample(cycles);
443,444c392,393
< m_missMachLatencyHist[respondingMach].add(cycles);
< m_missTypeMachLatencyHist[type][respondingMach].add(cycles);
---
> m_missMachLatencyHist[respondingMach]->sample(cycles);
> m_missTypeMachLatencyHist[type][respondingMach]->sample(cycles);
451c400
< m_IssueToInitialDelayHist[respondingMach].add(
---
> m_IssueToInitialDelayHist[respondingMach]->sample(
453c402
< m_InitialToForwardDelayHist[respondingMach].add(
---
> m_InitialToForwardDelayHist[respondingMach]->sample(
455c404
< m_ForwardToFirstResponseDelayHist[respondingMach].add(
---
> m_ForwardToFirstResponseDelayHist[respondingMach]->sample(
457c406
< m_FirstResponseToCompletionDelayHist[respondingMach].add(
---
> m_FirstResponseToCompletionDelayHist[respondingMach]->sample(
464,465c413,414
< m_hitLatencyHist.add(cycles);
< m_hitTypeLatencyHist[type].add(cycles);
---
> m_hitLatencyHist.sample(cycles);
> m_hitTypeLatencyHist[type]->sample(cycles);
468,469c417,418
< m_hitMachLatencyHist[respondingMach].add(cycles);
< m_hitTypeMachLatencyHist[type][respondingMach].add(cycles);
---
> m_hitMachLatencyHist[respondingMach]->sample(cycles);
> m_hitTypeMachLatencyHist[type][respondingMach]->sample(cycles);
812a762,834
>
> void
> Sequencer::regStats()
> {
> m_store_waiting_on_load
> .name(name() + ".store_waiting_on_load")
> .desc("Number of times a store aliased with a pending load")
> .flags(Stats::nozero);
> m_store_waiting_on_store
> .name(name() + ".store_waiting_on_store")
> .desc("Number of times a store aliased with a pending store")
> .flags(Stats::nozero);
> m_load_waiting_on_load
> .name(name() + ".load_waiting_on_load")
> .desc("Number of times a load aliased with a pending load")
> .flags(Stats::nozero);
> m_load_waiting_on_store
> .name(name() + ".load_waiting_on_store")
> .desc("Number of times a load aliased with a pending store")
> .flags(Stats::nozero);
>
> // These statistical variables are not for display.
> // The profiler will collate these across different
> // sequencers and display those collated statistics.
> m_outstandReqHist.init(10);
> m_latencyHist.init(10);
> m_hitLatencyHist.init(10);
> m_missLatencyHist.init(10);
>
> for (int i = 0; i < RubyRequestType_NUM; i++) {
> m_typeLatencyHist.push_back(new Stats::Histogram());
> m_typeLatencyHist[i]->init(10);
>
> m_hitTypeLatencyHist.push_back(new Stats::Histogram());
> m_hitTypeLatencyHist[i]->init(10);
>
> m_missTypeLatencyHist.push_back(new Stats::Histogram());
> m_missTypeLatencyHist[i]->init(10);
> }
>
> for (int i = 0; i < MachineType_NUM; i++) {
> m_hitMachLatencyHist.push_back(new Stats::Histogram());
> m_hitMachLatencyHist[i]->init(10);
>
> m_missMachLatencyHist.push_back(new Stats::Histogram());
> m_missMachLatencyHist[i]->init(10);
>
> m_IssueToInitialDelayHist.push_back(new Stats::Histogram());
> m_IssueToInitialDelayHist[i]->init(10);
>
> m_InitialToForwardDelayHist.push_back(new Stats::Histogram());
> m_InitialToForwardDelayHist[i]->init(10);
>
> m_ForwardToFirstResponseDelayHist.push_back(new Stats::Histogram());
> m_ForwardToFirstResponseDelayHist[i]->init(10);
>
> m_FirstResponseToCompletionDelayHist.push_back(new Stats::Histogram());
> m_FirstResponseToCompletionDelayHist[i]->init(10);
> }
>
> for (int i = 0; i < RubyRequestType_NUM; i++) {
> m_hitTypeMachLatencyHist.push_back(std::vector<Stats::Histogram *>());
> m_missTypeMachLatencyHist.push_back(std::vector<Stats::Histogram *>());
>
> for (int j = 0; j < MachineType_NUM; j++) {
> m_hitTypeMachLatencyHist[i].push_back(new Stats::Histogram());
> m_hitTypeMachLatencyHist[i][j]->init(10);
>
> m_missTypeMachLatencyHist[i].push_back(new Stats::Histogram());
> m_missTypeMachLatencyHist[i][j]->init(10);
> }
> }
> }