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>
This commit is contained in:
Avi Kivity
2010-03-11 10:50:44 +02:00
parent d4f64b6cad
commit 5bfd8b5455
3 changed files with 5 additions and 5 deletions

View File

@@ -2686,7 +2686,7 @@ static int handle_exit(struct kvm_vcpu *vcpu)
struct kvm_run *kvm_run = vcpu->run;
u32 exit_code = svm->vmcb->control.exit_code;
trace_kvm_exit(exit_code, svm->vmcb->save.rip);
trace_kvm_exit(exit_code, vcpu);
if (unlikely(svm->nested.exit_required)) {
nested_svm_vmexit(svm);