1669e846eSSanjay Lal /* 2669e846eSSanjay Lal * This file is subject to the terms and conditions of the GNU General Public 3669e846eSSanjay Lal * License. See the file "COPYING" in the main directory of this archive 4669e846eSSanjay Lal * for more details. 5669e846eSSanjay Lal * 6669e846eSSanjay Lal * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. 7669e846eSSanjay Lal * Authors: Sanjay Lal <sanjayl@kymasys.com> 8669e846eSSanjay Lal */ 9669e846eSSanjay Lal 10669e846eSSanjay Lal #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ) 11669e846eSSanjay Lal #define _TRACE_KVM_H 12669e846eSSanjay Lal 13669e846eSSanjay Lal #include <linux/tracepoint.h> 14669e846eSSanjay Lal 15669e846eSSanjay Lal #undef TRACE_SYSTEM 16669e846eSSanjay Lal #define TRACE_SYSTEM kvm 17669e846eSSanjay Lal #define TRACE_INCLUDE_PATH . 18669e846eSSanjay Lal #define TRACE_INCLUDE_FILE trace 19669e846eSSanjay Lal 20d116e812SDeng-Cheng Zhu /* Tracepoints for VM eists */ 21669e846eSSanjay Lal extern char *kvm_mips_exit_types_str[MAX_KVM_MIPS_EXIT_TYPES]; 22669e846eSSanjay Lal 23669e846eSSanjay Lal TRACE_EVENT(kvm_exit, 24669e846eSSanjay Lal TP_PROTO(struct kvm_vcpu *vcpu, unsigned int reason), 25669e846eSSanjay Lal TP_ARGS(vcpu, reason), 26669e846eSSanjay Lal TP_STRUCT__entry( 27*b3cffac0SJames Hogan __field(unsigned long, pc) 28669e846eSSanjay Lal __field(unsigned int, reason) 29669e846eSSanjay Lal ), 30669e846eSSanjay Lal 31669e846eSSanjay Lal TP_fast_assign( 32*b3cffac0SJames Hogan __entry->pc = vcpu->arch.pc; 33669e846eSSanjay Lal __entry->reason = reason; 34669e846eSSanjay Lal ), 35669e846eSSanjay Lal 36669e846eSSanjay Lal TP_printk("[%s]PC: 0x%08lx", 37669e846eSSanjay Lal kvm_mips_exit_types_str[__entry->reason], 38*b3cffac0SJames Hogan __entry->pc) 39669e846eSSanjay Lal ); 40669e846eSSanjay Lal 41669e846eSSanjay Lal #endif /* _TRACE_KVM_H */ 42669e846eSSanjay Lal 43669e846eSSanjay Lal /* This part must be outside protection */ 44669e846eSSanjay Lal #include <trace/define_trace.h> 45