trace.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  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. */
  9. #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
  10. #define _TRACE_KVM_H
  11. #include <linux/tracepoint.h>
  12. #undef TRACE_SYSTEM
  13. #define TRACE_SYSTEM kvm
  14. #define TRACE_INCLUDE_PATH .
  15. #define TRACE_INCLUDE_FILE trace
  16. /* Tracepoints for VM eists */
  17. extern char *kvm_mips_exit_types_str[MAX_KVM_MIPS_EXIT_TYPES];
  18. TRACE_EVENT(kvm_exit,
  19. TP_PROTO(struct kvm_vcpu *vcpu, unsigned int reason),
  20. TP_ARGS(vcpu, reason),
  21. TP_STRUCT__entry(
  22. __field(unsigned long, pc)
  23. __field(unsigned int, reason)
  24. ),
  25. TP_fast_assign(
  26. __entry->pc = vcpu->arch.pc;
  27. __entry->reason = reason;
  28. ),
  29. TP_printk("[%s]PC: 0x%08lx",
  30. kvm_mips_exit_types_str[__entry->reason],
  31. __entry->pc)
  32. );
  33. #endif /* _TRACE_KVM_H */
  34. /* This part must be outside protection */
  35. #include <trace/define_trace.h>