misc: Collapse all uses of DTRACE(x) to Debug::x.

Also mark the DTRACE macro as deprecated.

Change-Id: I99d9a9544b539117b375186e3e425d73d3c5cab7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45009
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
This commit is contained in:
Gabe Black
2021-04-29 22:47:31 -07:00
parent 2af00af0f6
commit 41d934cf18
38 changed files with 63 additions and 62 deletions

View File

@@ -1312,7 +1312,7 @@ DefaultCommit<Impl>::commitHead(const DynInstPtr &head_inst, unsigned inst_num)
if (head_inst->traceData) {
// We ignore ReExecution "faults" here as they are not real
// (architectural) faults but signal flush/replays.
if (DTRACE(ExecFaulting)
if (Debug::ExecFaulting
&& dynamic_cast<ReExec*>(inst_fault.get()) == nullptr) {
head_inst->traceData->setFaulting(true);
@@ -1362,7 +1362,7 @@ DefaultCommit<Impl>::commitHead(const DynInstPtr &head_inst, unsigned inst_num)
rob->retireHead(tid);
#if TRACING_ON
if (DTRACE(O3PipeView)) {
if (Debug::O3PipeView) {
head_inst->commitTick = curTick() - head_inst->fetchTick;
}
#endif

View File

@@ -700,7 +700,7 @@ DefaultDecode<Impl>::decodeInsts(ThreadID tid)
--insts_available;
#if TRACING_ON
if (DTRACE(O3PipeView)) {
if (Debug::O3PipeView) {
inst->decodeTick = curTick() - inst->fetchTick;
}
#endif

View File

@@ -93,7 +93,7 @@ BaseO3DynInst::BaseO3DynInst(const StaticInstPtr &_staticInst,
BaseO3DynInst::~BaseO3DynInst()
{
#if TRACING_ON
if (DTRACE(O3PipeView)) {
if (Debug::O3PipeView) {
Tick fetch = this->fetchTick;
// fetchTick can be -1 if the instruction fetched outside the trace
// window.

View File

@@ -1299,7 +1299,7 @@ DefaultFetch<Impl>::fetch(bool &status_change)
numInst++;
#if TRACING_ON
if (DTRACE(O3PipeView)) {
if (Debug::O3PipeView) {
instruction->fetchTick = curTick();
}
#endif

View File

@@ -1603,7 +1603,7 @@ DefaultIEW<Impl>::updateExeInstStats(const DynInstPtr& inst)
iewStats.executedInstStats.numInsts++;
#if TRACING_ON
if (DTRACE(O3PipeView)) {
if (Debug::O3PipeView) {
inst->completeTick = curTick() - inst->fetchTick;
}
#endif

View File

@@ -1186,7 +1186,7 @@ LSQUnit<Impl>::completeStore(typename StoreQueue::iterator store_idx)
store_inst->seqNum, store_idx.idx() - 1, storeQueue.head() - 1);
#if TRACING_ON
if (DTRACE(O3PipeView)) {
if (Debug::O3PipeView) {
store_inst->storeTick =
curTick() - store_inst->fetchTick;
}

View File

@@ -178,7 +178,7 @@ MemDepUnit<MemDepPred, Impl>::insertBarrierSN(const DynInstPtr &barr_inst)
if (barr_inst->isWriteBarrier() || barr_inst->isHtmCmd())
storeBarrierSNs.insert(barr_sn);
if (DTRACE(MemDepUnit)) {
if (Debug::MemDepUnit) {
const char *barrier_type = nullptr;
if (barr_inst->isReadBarrier() && barr_inst->isWriteBarrier())
barrier_type = "memory";
@@ -460,7 +460,7 @@ MemDepUnit<MemDepPred, Impl>::completeInst(const DynInstPtr &inst)
assert(hasLoadBarrier());
loadBarrierSNs.erase(barr_sn);
}
if (DTRACE(MemDepUnit)) {
if (Debug::MemDepUnit) {
const char *barrier_type = nullptr;
if (inst->isWriteBarrier() && inst->isReadBarrier())
barrier_type = "Memory";

View File

@@ -807,7 +807,7 @@ DefaultRename<Impl>::sortInsts()
const DynInstPtr &inst = fromDecode->insts[i];
insts[inst->threadNumber].push_back(inst);
#if TRACING_ON
if (DTRACE(O3PipeView)) {
if (Debug::O3PipeView) {
inst->renameTick = curTick() - inst->fetchTick;
}
#endif