diff options
author | Bryan Cantrill <bryan@joyent.com> | 2011-12-02 01:04:30 +0000 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2011-12-02 01:04:30 +0000 |
commit | cfe5813f8247c5492e51c7f072b85a4d0e13483b (patch) | |
tree | b00d3543a9a955e6582e911117068428d836d127 | |
parent | 3b2aaad2c0647aa661548ee3add64f1aa590100c (diff) | |
download | illumos-kvm-cfe5813f8247c5492e51c7f072b85a4d0e13483b.tar.gz |
HVM-706 need static instrumentation in vcpu_load()/vcpu_put()
-rw-r--r-- | kvm.c | 4 | ||||
-rw-r--r-- | kvm_host.h | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -484,6 +484,8 @@ vcpu_load(struct kvm_vcpu *vcpu) installctx(curthread, vcpu, kvm_ctx_save, kvm_ctx_restore, NULL, NULL, NULL, NULL); kvm_arch_vcpu_load(vcpu, cpu); + kvm_ringbuf_record(&vcpu->kvcpu_ringbuf, + KVM_RINGBUF_TAG_VCPULOAD, vcpu->cpu); kpreempt_enable(); } @@ -502,6 +504,8 @@ vcpu_put(struct kvm_vcpu *vcpu) kvm_fire_urn(vcpu); removectx(curthread, vcpu, kvm_ctx_save, kvm_ctx_restore, NULL, NULL, NULL, NULL); + kvm_ringbuf_record(&vcpu->kvcpu_ringbuf, + KVM_RINGBUF_TAG_VCPUPUT, vcpu->cpu); kpreempt_enable(); mutex_exit(&vcpu->mutex); } @@ -107,6 +107,8 @@ extern int kvm_io_bus_unregister_dev(struct kvm *, enum kvm_bus, #define KVM_RINGBUF_TAG_VMPTRLD 3 #define KVM_RINGBUF_TAG_VCPUMIGRATE 4 #define KVM_RINGBUF_TAG_VCPUCLEAR 5 +#define KVM_RINGBUF_TAG_VCPULOAD 6 +#define KVM_RINGBUF_TAG_VCPUPUT 7 typedef struct kvm_ringbuf_entry { uint32_t kvmre_tag; /* tag for this entry */ |