Commit fb6cec14 authored by James Hogan's avatar James Hogan Committed by Paolo Bonzini

MIPS: KVM: Combine entry trace events into class

Combine the kvm_enter, kvm_reenter and kvm_out trace events into a
single kvm_transition event class to reduce duplication and bloat.
Suggested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Fixes: 93258604 ("MIPS: KVM: Add guest mode switch trace events")
Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim KrčmáŠ<rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 87aeb54f
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/* /*
* Tracepoints for VM enters * Tracepoints for VM enters
*/ */
TRACE_EVENT(kvm_enter, DECLARE_EVENT_CLASS(kvm_transition,
TP_PROTO(struct kvm_vcpu *vcpu), TP_PROTO(struct kvm_vcpu *vcpu),
TP_ARGS(vcpu), TP_ARGS(vcpu),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -35,35 +35,17 @@ TRACE_EVENT(kvm_enter, ...@@ -35,35 +35,17 @@ TRACE_EVENT(kvm_enter,
__entry->pc) __entry->pc)
); );
TRACE_EVENT(kvm_reenter, DEFINE_EVENT(kvm_transition, kvm_enter,
TP_PROTO(struct kvm_vcpu *vcpu), TP_PROTO(struct kvm_vcpu *vcpu),
TP_ARGS(vcpu), TP_ARGS(vcpu));
TP_STRUCT__entry(
__field(unsigned long, pc)
),
TP_fast_assign(
__entry->pc = vcpu->arch.pc;
),
TP_printk("PC: 0x%08lx",
__entry->pc)
);
TRACE_EVENT(kvm_out, DEFINE_EVENT(kvm_transition, kvm_reenter,
TP_PROTO(struct kvm_vcpu *vcpu), TP_PROTO(struct kvm_vcpu *vcpu),
TP_ARGS(vcpu), TP_ARGS(vcpu));
TP_STRUCT__entry(
__field(unsigned long, pc)
),
TP_fast_assign(
__entry->pc = vcpu->arch.pc;
),
TP_printk("PC: 0x%08lx", DEFINE_EVENT(kvm_transition, kvm_out,
__entry->pc) TP_PROTO(struct kvm_vcpu *vcpu),
); TP_ARGS(vcpu));
/* The first 32 exit reasons correspond to Cause.ExcCode */ /* The first 32 exit reasons correspond to Cause.ExcCode */
#define KVM_TRACE_EXIT_INT 0 #define KVM_TRACE_EXIT_INT 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment