Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/25305 )
Change subject: cpu, sim: Remove unused System::totalNumInst
......................................................................
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 <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25305
Reviewed-by: Gabe Black <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/cpu/kvm/base.cc
M src/cpu/minor/execute.cc
M src/cpu/o3/cpu.cc
M src/cpu/simple/base.cc
M src/cpu/simple/timing.cc
M src/sim/system.cc
M src/sim/system.hh
7 files changed, 0 insertions(+), 16 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc
index cb0b4bb..b364d4f 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -766,7 +766,6 @@
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 52708ab..3eb7811 100644
--- a/src/cpu/minor/execute.cc
+++ b/src/cpu/minor/execute.cc
@@ -866,7 +866,6 @@
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 c67ee64..c910cc4 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1474,7 +1474,6 @@
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 dc58e0a..7f4797b 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -166,7 +166,6 @@
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 5e9eb92..0fd83ca 100644
--- a/src/cpu/simple/timing.cc
+++ b/src/cpu/simple/timing.cc
@@ -148,8 +148,6 @@
// 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 d31238c..de4744a 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -229,7 +229,6 @@
_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)
@@ -440,12 +439,6 @@
}
void
-System::drainResume()
-{
- totalNumInsts = 0;
-}
-
-void
System::serialize(CheckpointOut &cp) const
{
SERIALIZE_SCALAR(pagePtr);
diff --git a/src/sim/system.hh b/src/sim/system.hh
index 4954af6..ce77f0a 100644
--- a/src/sim/system.hh
+++ b/src/sim/system.hh
@@ -592,10 +592,7 @@
void serialize(CheckpointOut &cp) const override;
void unserialize(CheckpointIn &cp) override;
- void drainResume() override;
-
public:
- Counter totalNumInsts;
std::map<std::pair<uint32_t,uint32_t>, Tick> lastWorkItemStarted;
std::map<uint32_t, Stats::Histogram*> workItemStats;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/25305
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ic5c805ac3b2e87bbacb365108d4060f53e044b4e
Gerrit-Change-Number: 25305
Gerrit-PatchSet: 4
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s