cpu-kvm: Implement IPC and CPI base stats for KVM CPU

Replaced committedInsts stats of KVM CPU with commitStats.numInsts
of BaseCPU. This results in IPC and CPI printing in stats.txt for
KVM simulation.

Change-Id: Ia7713f88f15e3cabd4c96a8c2921515340bc71e2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69104
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Melissa Jost
2023-03-13 11:25:59 -07:00
committed by Bobby Bruce
parent 1d035e1e20
commit a882373e82

View File

@@ -779,6 +779,9 @@ BaseKvmCPU::kvmRun(Tick ticks)
/* Update statistics */
baseStats.numCycles += simCyclesExecuted;;
stats.committedInsts += instsExecuted;
// update both old and new stats
commitStats[thread->threadId()]->numInsts += instsExecuted;
baseStats.numInsts += instsExecuted;
ctrInsts += instsExecuted;
DPRINTF(KvmRun,