changeset 9df73385c878 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=9df73385c878
description:
        kvm: Add more VM stats

        This changeset adds the following stats to KVM:
         * numVMHalfEntries: Number of entries into KVM to finalize pending
           IO operations without executing guest instructions. These typically
           happen as a result of a drain where the guest must finalize some
           operations before the guest state is consistent.
         * numExitSignal: Number of VM exits that have been triggered by a
           signal. These usually happen as a result of the timer that limits
           the time spent in KVM.

diffstat:

 src/cpu/kvm/base.cc |  18 ++++++++++++++++--
 src/cpu/kvm/base.hh |   2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diffs (56 lines):

diff -r 91fbf7b7e933 -r 9df73385c878 src/cpu/kvm/base.cc
--- a/src/cpu/kvm/base.cc       Tue Jun 11 09:24:55 2013 +0200
+++ b/src/cpu/kvm/base.cc       Tue Jun 11 09:43:05 2013 +0200
@@ -201,6 +201,16 @@
         .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 @@
 
           // 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 @@
         // 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 -r 91fbf7b7e933 -r 9df73385c878 src/cpu/kvm/base.hh
--- a/src/cpu/kvm/base.hh       Tue Jun 11 09:24:55 2013 +0200
+++ b/src/cpu/kvm/base.hh       Tue Jun 11 09:43:05 2013 +0200
@@ -687,6 +687,8 @@
     /* @{ */
     Stats::Scalar numInsts;
     Stats::Scalar numVMExits;
+    Stats::Scalar numVMHalfEntries;
+    Stats::Scalar numExitSignal;
     Stats::Scalar numMMIO;
     Stats::Scalar numCoalescedMMIO;
     Stats::Scalar numIO;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to