Re: [PATCH 5/8] MIPS: KVM: Add guest mode switch trace events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 14 Jun 2016 09:40:14 +0100
James Hogan <james.hogan@xxxxxxxxxx> wrote:


> --- a/arch/mips/kvm/trace.h
> +++ b/arch/mips/kvm/trace.h
> @@ -17,6 +17,54 @@
>  #define TRACE_INCLUDE_PATH .
>  #define TRACE_INCLUDE_FILE trace
>  
> +/*
> + * Tracepoints for VM enters
> + */
> +TRACE_EVENT(kvm_enter,
> +	    TP_PROTO(struct kvm_vcpu *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_reenter,
> +	    TP_PROTO(struct kvm_vcpu *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,
> +	    TP_PROTO(struct kvm_vcpu *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)
> +);

Please combine the above TRACE_EVENT()s to use a single
DECLARE_EVENT_CLASS() and three DEFINE_EVENT()s.

-- Steve

> +
>  /* The first 32 exit reasons correspond to Cause.ExcCode */
>  #define KVM_TRACE_EXIT_INT		 0
>  #define KVM_TRACE_EXIT_TLBMOD		 1





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux