summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/kvm/base.cc18
-rw-r--r--src/cpu/kvm/base.hh2
2 files changed, 18 insertions, 2 deletions
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc
index 539790e52..4c176c18b 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -201,6 +201,16 @@ BaseKvmCPU::regStats()
.desc("total number of KVM exits")
;
+ numVMHalfEntries
+ .name(name() + ".numVMHalfEntries")
+ .desc("number of KVM entries to finalize pending operations")
+ ;
+
+ numExitSignal
+ .name(name() + ".numExitSignal")
+ .desc("exits due to signal delivery")
+ ;
+
numMMIO
.name(name() + ".numMMIO")
.desc("number of VM exits due to memory mapped IO")
@@ -523,10 +533,12 @@ BaseKvmCPU::tick()
// Enter into the RunningService state unless the
// simulation was stopped by a timer.
- if (_kvmRun->exit_reason != KVM_EXIT_INTR)
+ if (_kvmRun->exit_reason != KVM_EXIT_INTR) {
_status = RunningService;
- else
+ } else {
+ ++numExitSignal;
_status = Running;
+ }
if (tryDrain())
_status = Idle;
@@ -574,6 +586,8 @@ BaseKvmCPU::kvmRun(Tick ticks)
// then immediately exits.
DPRINTF(KvmRun, "KVM: Delivering IO without full guest entry\n");
+ ++numVMHalfEntries;
+
// This signal is always masked while we are executing in gem5
// and gets unmasked temporarily as soon as we enter into
// KVM. See setSignalMask() and setupSignalHandler().
diff --git a/src/cpu/kvm/base.hh b/src/cpu/kvm/base.hh
index 2e3ee551b..3c299ce4e 100644
--- a/src/cpu/kvm/base.hh
+++ b/src/cpu/kvm/base.hh
@@ -687,6 +687,8 @@ class BaseKvmCPU : public BaseCPU
/* @{ */
Stats::Scalar numInsts;
Stats::Scalar numVMExits;
+ Stats::Scalar numVMHalfEntries;
+ Stats::Scalar numExitSignal;
Stats::Scalar numMMIO;
Stats::Scalar numCoalescedMMIO;
Stats::Scalar numIO;