From 8ceff741dd35e6dc73f12e99ca38a717957a50af Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 21 Jan 2010 15:31:52 +0200 Subject: [PATCH] --- yaml --- r: 186035 b: refs/heads/master c: 0c04851c0c093ce98ab4ca69556480d779292418 h: refs/heads/master i: 186033: 36577293975c9ecf998be3dd186c103d66b2d042 186031: 5e47cec1d9d8db3303d98c07e8b029066ccf2e0e v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/x86.c | 2 ++ trunk/include/trace/events/kvm.h | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d0d70e3756d1..2d2d5df09413 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8ae099127668de80e4babba73bb492740ce3a1be +refs/heads/master: 0c04851c0c093ce98ab4ca69556480d779292418 diff --git a/trunk/arch/x86/kvm/x86.c b/trunk/arch/x86/kvm/x86.c index 27af6e353b06..3b90298fb980 100644 --- a/trunk/arch/x86/kvm/x86.c +++ b/trunk/arch/x86/kvm/x86.c @@ -5292,6 +5292,7 @@ void kvm_load_guest_fpu(struct kvm_vcpu *vcpu) vcpu->guest_fpu_loaded = 1; kvm_fx_save(&vcpu->arch.host_fx_image); kvm_fx_restore(&vcpu->arch.guest_fx_image); + trace_kvm_fpu(1); } void kvm_put_guest_fpu(struct kvm_vcpu *vcpu) @@ -5304,6 +5305,7 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu) kvm_fx_restore(&vcpu->arch.host_fx_image); ++vcpu->stat.fpu_reload; set_bit(KVM_REQ_DEACTIVATE_FPU, &vcpu->requests); + trace_kvm_fpu(0); } void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) diff --git a/trunk/include/trace/events/kvm.h b/trunk/include/trace/events/kvm.h index dbe108455275..8abdc1230143 100644 --- a/trunk/include/trace/events/kvm.h +++ b/trunk/include/trace/events/kvm.h @@ -145,6 +145,25 @@ TRACE_EVENT(kvm_mmio, __entry->len, __entry->gpa, __entry->val) ); +#define kvm_fpu_load_symbol \ + {0, "unload"}, \ + {1, "load"} + +TRACE_EVENT(kvm_fpu, + TP_PROTO(int load), + TP_ARGS(load), + + TP_STRUCT__entry( + __field( u32, load ) + ), + + TP_fast_assign( + __entry->load = load; + ), + + TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol)) +); + #endif /* _TRACE_KVM_MAIN_H */ /* This part must be outside protection */