cpu: fix simInsts and simOps not resetting (#1615)

This PR fixes the bug where simInsts and simOps don't reset when
m5.stats.reset() is called. The stats hostInstRate and hostOpRate are
affected by this change as well, as they depend on simInsts and simOps
respectively.

This is related to issue 1443 linked
[here](https://github.com/gem5/gem5/issues/1443).
This commit is contained in:
Erin (Jianghua) Le
2024-10-09 19:49:43 -07:00
committed by GitHub
parent 3443788013
commit feeb3b2d67
3 changed files with 29 additions and 5 deletions

View File

@@ -859,13 +859,13 @@ BaseCPU::GlobalStats::GlobalStats(statistics::Group *parent)
"Simulator op (including micro ops) rate (op/s)")
{
simInsts
.functor(BaseCPU::numSimulatedInsts)
.functor(BaseCPU::GlobalStats::numSimulatedInsts)
.precision(0)
.prereq(simInsts)
;
simOps
.functor(BaseCPU::numSimulatedOps)
.functor(BaseCPU::GlobalStats::numSimulatedOps)
.precision(0)
.prereq(simOps)
;