diff options
author | Avi Kivity <avi@redhat.com> | 2010-03-11 09:50:44 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 11:15:25 +0200 |
commit | 5bfd8b5455e69b37af16a2df1edae2c3b567648c (patch) | |
tree | 2b7ccd08791b327f27ec340687eadd82980873d6 /arch/x86/kvm/trace.h | |
parent | KVM: remove redundant initialization of page->private (diff) | |
download | linux-5bfd8b5455e69b37af16a2df1edae2c3b567648c.tar.xz linux-5bfd8b5455e69b37af16a2df1edae2c3b567648c.zip |
KVM: Move kvm_exit tracepoint rip reading inside tracepoint
Reading rip is expensive on vmx, so move it inside the tracepoint so we only
incur the cost if tracing is enabled.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r-- | arch/x86/kvm/trace.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index b75efef79e56..d10b359a21f3 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h @@ -182,8 +182,8 @@ TRACE_EVENT(kvm_apic, * Tracepoint for kvm guest exit: */ TRACE_EVENT(kvm_exit, - TP_PROTO(unsigned int exit_reason, unsigned long guest_rip), - TP_ARGS(exit_reason, guest_rip), + TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu), + TP_ARGS(exit_reason, vcpu), TP_STRUCT__entry( __field( unsigned int, exit_reason ) @@ -192,7 +192,7 @@ TRACE_EVENT(kvm_exit, TP_fast_assign( __entry->exit_reason = exit_reason; - __entry->guest_rip = guest_rip; + __entry->guest_rip = kvm_rip_read(vcpu); ), TP_printk("reason %s rip 0x%lx", |