summaryrefslogtreecommitdiff
path: root/src/cpu/o3/dyn_inst_impl.hh
diff options
context:
space:
mode:
authorMatt Horsnell <Matt.Horsnell@arm.com>2013-02-15 17:40:09 -0500
committerMatt Horsnell <Matt.Horsnell@arm.com>2013-02-15 17:40:09 -0500
commite88e7d88b9a9876ee040dad96acf3deabebe1fa7 (patch)
tree54322d578272a21cd721788f25746cfbd88d94bb /src/cpu/o3/dyn_inst_impl.hh
parent64599080697a8db49b7e28609927bb4c1ed3c05e (diff)
downloadgem5-e88e7d88b9a9876ee040dad96acf3deabebe1fa7.tar.xz
o3: fix tick used for renaming and issue with range selection
Fixes the tick used from rename: - previously this gathered the tick on leaving rename which was always 1 less than the dispatch. This conflated the decode ticks when back pressure built in the pipeline. - now picks up tick on entry. Added --store_completions flag: - will additionally display the store completion tail in the viewer. - this highlights periods when large numbers of stores are outstanding (>16 LSQ blocking) Allows selection by tick range (previously this caused an infinite loop)
Diffstat (limited to 'src/cpu/o3/dyn_inst_impl.hh')
-rw-r--r--src/cpu/o3/dyn_inst_impl.hh50
1 files changed, 30 insertions, 20 deletions
diff --git a/src/cpu/o3/dyn_inst_impl.hh b/src/cpu/o3/dyn_inst_impl.hh
index e37caf7f0..347d30324 100644
--- a/src/cpu/o3/dyn_inst_impl.hh
+++ b/src/cpu/o3/dyn_inst_impl.hh
@@ -66,26 +66,35 @@ BaseO3DynInst<Impl>::BaseO3DynInst(StaticInstPtr _staticInst,
template <class Impl>BaseO3DynInst<Impl>::~BaseO3DynInst()
{
#if TRACING_ON
- Tick val, fetch = this->fetchTick;
- // Print info needed by the pipeline activity viewer.
- DPRINTFR(O3PipeView, "O3PipeView:fetch:%llu:0x%08llx:%d:%llu:%s\n",
- fetch,
- this->instAddr(),
- this->microPC(),
- this->seqNum,
- this->staticInst->disassemble(this->instAddr()));
- val = (this->decodeTick == -1) ? 0 : fetch + this->decodeTick;
- DPRINTFR(O3PipeView, "O3PipeView:decode:%llu\n", val);
- val = (this->renameTick == -1) ? 0 : fetch + this->renameTick;
- DPRINTFR(O3PipeView, "O3PipeView:rename:%llu\n", val);
- val = (this->dispatchTick == -1) ? 0 : fetch + this->dispatchTick;
- DPRINTFR(O3PipeView, "O3PipeView:dispatch:%llu\n", val);
- val = (this->issueTick == -1) ? 0 : fetch + this->issueTick;
- DPRINTFR(O3PipeView, "O3PipeView:issue:%llu\n", val);
- val = (this->completeTick == -1) ? 0 : fetch + this->completeTick;
- DPRINTFR(O3PipeView, "O3PipeView:complete:%llu\n", val);
- val = (this->commitTick == -1) ? 0 : fetch + this->commitTick;
- DPRINTFR(O3PipeView, "O3PipeView:retire:%llu\n", val);
+ if (DTRACE(O3PipeView)) {
+ Tick fetch = this->fetchTick;
+ // fetchTick can be -1 if the instruction fetched outside the trace window.
+ if (fetch != -1) {
+ Tick val;
+ // Print info needed by the pipeline activity viewer.
+ DPRINTFR(O3PipeView, "O3PipeView:fetch:%llu:0x%08llx:%d:%llu:%s\n",
+ fetch,
+ this->instAddr(),
+ this->microPC(),
+ this->seqNum,
+ this->staticInst->disassemble(this->instAddr()));
+
+ val = (this->decodeTick == -1) ? 0 : fetch + this->decodeTick;
+ DPRINTFR(O3PipeView, "O3PipeView:decode:%llu\n", val);
+ val = (this->renameTick == -1) ? 0 : fetch + this->renameTick;
+ DPRINTFR(O3PipeView, "O3PipeView:rename:%llu\n", val);
+ val = (this->dispatchTick == -1) ? 0 : fetch + this->dispatchTick;
+ DPRINTFR(O3PipeView, "O3PipeView:dispatch:%llu\n", val);
+ val = (this->issueTick == -1) ? 0 : fetch + this->issueTick;
+ DPRINTFR(O3PipeView, "O3PipeView:issue:%llu\n", val);
+ val = (this->completeTick == -1) ? 0 : fetch + this->completeTick;
+ DPRINTFR(O3PipeView, "O3PipeView:complete:%llu\n", val);
+ val = (this->commitTick == -1) ? 0 : fetch + this->commitTick;
+
+ Tick valS = (this->storeTick == -1) ? 0 : fetch + this->storeTick;
+ DPRINTFR(O3PipeView, "O3PipeView:retire:%llu:store:%llu\n", val, valS);
+ }
+ }
#endif
};
@@ -119,6 +128,7 @@ BaseO3DynInst<Impl>::initVars()
issueTick = -1;
completeTick = -1;
commitTick = -1;
+ storeTick = -1;
#endif
}