summaryrefslogtreecommitdiff
path: root/kvm.c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-08-04 00:35:14 +0000
committerRobert Mustacchi <rm@joyent.com>2011-08-04 22:56:48 +0000
commit6b4805585ee5fd1eca7ab4285895d41d996aedd7 (patch)
tree652ed46b9217792157e890d95f46e2a3beb200be /kvm.c
parent1d7fe23bfbd982f912c1c679f844b32e4ca692f6 (diff)
downloadillumos-kvm-6b4805585ee5fd1eca7ab4285895d41d996aedd7.tar.gz
HVM-554 vm and vcpu kstats should contain a zonename field
Diffstat (limited to 'kvm.c')
-rw-r--r--kvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm.c b/kvm.c
index 7459218..e4d5c24 100644
--- a/kvm.c
+++ b/kvm.c
@@ -703,6 +703,8 @@ kvm_create_vm(void)
}
kvmp->kvm_kstat->ks_data = &kvmp->kvm_stats;
+ kvmp->kvm_kstat->ks_data_size +=
+ strlen(curproc->p_zone->zone_name) + 1;
KVM_KSTAT_INIT(kvmp, kvmks_pid, "pid");
kvmp->kvm_stats.kvmks_pid.value.ui64 = kvmp->kvm_pid = curproc->p_pid;
@@ -716,6 +718,8 @@ kvm_create_vm(void)
KVM_KSTAT_INIT(kvmp, kvmks_remote_tlb_flush, "remote-tlb-flush");
KVM_KSTAT_INIT(kvmp, kvmks_lpages, "lpages");
KVM_KSTAT_INIT(kvmp, kvmks_mmu_unsync_page, "mmu-unsync-page");
+ kstat_named_init(&(kvmp->kvm_stats.kvmks_zonename), "zonename", KSTAT_DATA_STRING);
+ kstat_named_setstr(&(kvmp->kvm_stats.kvmks_zonename), curproc->p_zone->zone_name);
kstat_install(kvmp->kvm_kstat);