2012-11-22 10:34:02 +08:00
|
|
|
/*
|
2014-06-27 03:11:34 +08:00
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
|
|
|
|
* Authors: Sanjay Lal <sanjayl@kymasys.com>
|
|
|
|
*/
|
2012-11-22 10:34:02 +08:00
|
|
|
|
|
|
|
#if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _TRACE_KVM_H
|
|
|
|
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM kvm
|
|
|
|
#define TRACE_INCLUDE_PATH .
|
|
|
|
#define TRACE_INCLUDE_FILE trace
|
|
|
|
|
2014-06-27 03:11:34 +08:00
|
|
|
/* Tracepoints for VM eists */
|
2012-11-22 10:34:02 +08:00
|
|
|
extern char *kvm_mips_exit_types_str[MAX_KVM_MIPS_EXIT_TYPES];
|
|
|
|
|
|
|
|
TRACE_EVENT(kvm_exit,
|
|
|
|
TP_PROTO(struct kvm_vcpu *vcpu, unsigned int reason),
|
|
|
|
TP_ARGS(vcpu, reason),
|
|
|
|
TP_STRUCT__entry(
|
2015-02-24 19:46:20 +08:00
|
|
|
__field(unsigned long, pc)
|
2012-11-22 10:34:02 +08:00
|
|
|
__field(unsigned int, reason)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2015-02-24 19:46:20 +08:00
|
|
|
__entry->pc = vcpu->arch.pc;
|
2012-11-22 10:34:02 +08:00
|
|
|
__entry->reason = reason;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("[%s]PC: 0x%08lx",
|
|
|
|
kvm_mips_exit_types_str[__entry->reason],
|
2015-02-24 19:46:20 +08:00
|
|
|
__entry->pc)
|
2012-11-22 10:34:02 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
#endif /* _TRACE_KVM_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|