aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/trace.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-03-11 03:50:44 -0500
committerAvi Kivity <avi@redhat.com>2010-05-17 05:15:25 -0400
commit5bfd8b5455e69b37af16a2df1edae2c3b567648c (patch)
tree2b7ccd08791b327f27ec340687eadd82980873d6 /arch/x86/kvm/trace.h
parentd4f64b6cad0fc0fb4cec868c6ca6b1325949d08b (diff)
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.h6
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,
182 * Tracepoint for kvm guest exit: 182 * Tracepoint for kvm guest exit:
183 */ 183 */
184TRACE_EVENT(kvm_exit, 184TRACE_EVENT(kvm_exit,
185 TP_PROTO(unsigned int exit_reason, unsigned long guest_rip), 185 TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu),
186 TP_ARGS(exit_reason, guest_rip), 186 TP_ARGS(exit_reason, vcpu),
187 187
188 TP_STRUCT__entry( 188 TP_STRUCT__entry(
189 __field( unsigned int, exit_reason ) 189 __field( unsigned int, exit_reason )
@@ -192,7 +192,7 @@ TRACE_EVENT(kvm_exit,
192 192
193 TP_fast_assign( 193 TP_fast_assign(
194 __entry->exit_reason = exit_reason; 194 __entry->exit_reason = exit_reason;
195 __entry->guest_rip = guest_rip; 195 __entry->guest_rip = kvm_rip_read(vcpu);
196 ), 196 ),
197 197
198 TP_printk("reason %s rip 0x%lx", 198 TP_printk("reason %s rip 0x%lx",