1*669e846eSSanjay Lal /* 2*669e846eSSanjay Lal * This file is subject to the terms and conditions of the GNU General Public 3*669e846eSSanjay Lal * License. See the file "COPYING" in the main directory of this archive 4*669e846eSSanjay Lal * for more details. 5*669e846eSSanjay Lal * 6*669e846eSSanjay Lal * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. 7*669e846eSSanjay Lal * Authors: Sanjay Lal <sanjayl@kymasys.com> 8*669e846eSSanjay Lal */ 9*669e846eSSanjay Lal 10*669e846eSSanjay Lal #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ) 11*669e846eSSanjay Lal #define _TRACE_KVM_H 12*669e846eSSanjay Lal 13*669e846eSSanjay Lal #include <linux/tracepoint.h> 14*669e846eSSanjay Lal 15*669e846eSSanjay Lal #undef TRACE_SYSTEM 16*669e846eSSanjay Lal #define TRACE_SYSTEM kvm 17*669e846eSSanjay Lal #define TRACE_INCLUDE_PATH . 18*669e846eSSanjay Lal #define TRACE_INCLUDE_FILE trace 19*669e846eSSanjay Lal 20*669e846eSSanjay Lal /* 21*669e846eSSanjay Lal * Tracepoints for VM eists 22*669e846eSSanjay Lal */ 23*669e846eSSanjay Lal extern char *kvm_mips_exit_types_str[MAX_KVM_MIPS_EXIT_TYPES]; 24*669e846eSSanjay Lal 25*669e846eSSanjay Lal TRACE_EVENT(kvm_exit, 26*669e846eSSanjay Lal TP_PROTO(struct kvm_vcpu *vcpu, unsigned int reason), 27*669e846eSSanjay Lal TP_ARGS(vcpu, reason), 28*669e846eSSanjay Lal TP_STRUCT__entry( 29*669e846eSSanjay Lal __field(struct kvm_vcpu *, vcpu) 30*669e846eSSanjay Lal __field(unsigned int, reason) 31*669e846eSSanjay Lal ), 32*669e846eSSanjay Lal 33*669e846eSSanjay Lal TP_fast_assign( 34*669e846eSSanjay Lal __entry->vcpu = vcpu; 35*669e846eSSanjay Lal __entry->reason = reason; 36*669e846eSSanjay Lal ), 37*669e846eSSanjay Lal 38*669e846eSSanjay Lal TP_printk("[%s]PC: 0x%08lx", 39*669e846eSSanjay Lal kvm_mips_exit_types_str[__entry->reason], 40*669e846eSSanjay Lal __entry->vcpu->arch.pc) 41*669e846eSSanjay Lal ); 42*669e846eSSanjay Lal 43*669e846eSSanjay Lal #endif /* _TRACE_KVM_H */ 44*669e846eSSanjay Lal 45*669e846eSSanjay Lal /* This part must be outside protection */ 46*669e846eSSanjay Lal #include <trace/define_trace.h> 47