summaryrefslogtreecommitdiffstats
path: root/sys/amd64/vmm/vmm_stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/vmm/vmm_stat.c')
-rw-r--r--sys/amd64/vmm/vmm_stat.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/amd64/vmm/vmm_stat.c b/sys/amd64/vmm/vmm_stat.c
index ae60979..ae156ee 100644
--- a/sys/amd64/vmm/vmm_stat.c
+++ b/sys/amd64/vmm/vmm_stat.c
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
#include <sys/smp.h>
#include <machine/vmm.h>
+#include "vmm_util.h"
#include "vmm_stat.h"
static int vstnum;
@@ -52,6 +53,12 @@ vmm_stat_init(void *arg)
if (vst->desc == NULL)
return;
+ if (vst->scope == VMM_STAT_SCOPE_INTEL && !vmm_is_intel())
+ return;
+
+ if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_amd())
+ return;
+
if (vstnum >= MAX_VMM_STAT_TYPES) {
printf("Cannot accomodate vmm stat type \"%s\"!\n", vst->desc);
return;
@@ -102,3 +109,9 @@ vmm_stat_desc(int index)
else
return (NULL);
}
+
+/* global statistics */
+VMM_STAT(VCPU_MIGRATIONS, "vcpu migration across host cpus");
+VMM_STAT(VMEXIT_COUNT, "total number of vm exits");
+VMM_STAT(VMEXIT_EXTINT, "vm exits due to external interrupt");
+VMM_STAT(VMEXIT_HLT, "number of times hlt was intercepted");
OpenPOWER on IntegriCloud