From a882373e82643f9b7ad9cd8a37ae216a1d721b34 Mon Sep 17 00:00:00 2001 From: Melissa Jost Date: Mon, 13 Mar 2023 11:25:59 -0700 Subject: [PATCH] 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 Maintainer: Andreas Sandberg Tested-by: kokoro --- src/cpu/kvm/base.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc index b76bddc2fd..5857f696dd 100644 --- a/src/cpu/kvm/base.cc +++ b/src/cpu/kvm/base.cc @@ -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,