From: Giacomo Travaglini Date: Fri, 7 Feb 2020 16:50:22 +0000 (+0000) Subject: cpu, sim: Remove unused System::totalNumInst X-Git-Tag: develop-gem5-snapshot~400 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5ede90a5dd179574808b95809cb5bfacfe81454;p=gem5.git cpu, sim: Remove unused System::totalNumInst This counter gets augmented for every executed instruction but it is not used. It is also overlapping with the BaseCPU::numSimulatedInsts A client willing to know the number of simulated instruction should rely on the interface above. Change-Id: Ic5c805ac3b2e87bbacb365108d4060f53e044b4e Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25305 Reviewed-by: Gabe Black Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc index cb0b4bb0d..b364d4f29 100644 --- a/src/cpu/kvm/base.cc +++ b/src/cpu/kvm/base.cc @@ -766,7 +766,6 @@ BaseKvmCPU::kvmRun(Tick ticks) baseStats.numCycles += simCyclesExecuted;; stats.committedInsts += instsExecuted; ctrInsts += instsExecuted; - system->totalNumInsts += instsExecuted; DPRINTF(KvmRun, "KVM: Executed %i instructions in %i cycles " diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc index 52708abbe..3eb781141 100644 --- a/src/cpu/minor/execute.cc +++ b/src/cpu/minor/execute.cc @@ -866,7 +866,6 @@ Execute::doInstCommitAccounting(MinorDynInstPtr inst) thread->numInst++; thread->threadStats.numInsts++; cpu.stats.numInsts++; - cpu.system->totalNumInsts++; /* Act on events related to instruction counts */ thread->comInstEventQueue.serviceEvents(thread->numInst); diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index c67ee64b4..c910cc487 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -1474,7 +1474,6 @@ FullO3CPU::instDone(ThreadID tid, const DynInstPtr &inst) thread[tid]->numInst++; thread[tid]->threadStats.numInsts++; cpuStats.committedInsts[tid]++; - system->totalNumInsts++; // Check for instruction-count-based events. thread[tid]->comInstEventQueue.serviceEvents(thread[tid]->numInst); diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc index dc58e0aca..7f4797b62 100644 --- a/src/cpu/simple/base.cc +++ b/src/cpu/simple/base.cc @@ -166,7 +166,6 @@ BaseSimpleCPU::countInst() t_info.numInst++; t_info.execContextStats.numInsts++; - system->totalNumInsts++; t_info.thread->funcExeInst++; } t_info.numOp++; diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 5e9eb92d7..0fd83cae5 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -148,8 +148,6 @@ TimingSimpleCPU::drainResume() // Reschedule any power gating event (if any) schedulePowerGatingEvent(); - - system->totalNumInsts = 0; } bool diff --git a/src/sim/system.cc b/src/sim/system.cc index d31238c34..de4744a5f 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -229,7 +229,6 @@ System::System(const Params &p) _m5opRange(p.m5ops_base ? RangeSize(p.m5ops_base, 0x10000) : AddrRange(1, 0)), // Create an empty range if disabled - totalNumInsts(0), redirectPaths(p.redirect_paths) { if (workload) @@ -439,12 +438,6 @@ System::getDeviceMemory(RequestorID id) const return deviceMemMap.at(id); } -void -System::drainResume() -{ - totalNumInsts = 0; -} - void System::serialize(CheckpointOut &cp) const { diff --git a/src/sim/system.hh b/src/sim/system.hh index 4954af68f..ce77f0ad2 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -592,10 +592,7 @@ class System : public SimObject, public PCEventScope void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; - void drainResume() override; - public: - Counter totalNumInsts; std::map, Tick> lastWorkItemStarted; std::map workItemStats;