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