mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
d4f64b6cad
commit
5bfd8b5455
3 changed files with 5 additions and 5 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue