vfio_ccw_trace.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* SPDX-License-Identifier: GPL-2.0
  2. * Tracepoints for vfio_ccw driver
  3. *
  4. * Copyright IBM Corp. 2018
  5. *
  6. * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
  7. * Halil Pasic <pasic@linux.vnet.ibm.com>
  8. */
  9. #undef TRACE_SYSTEM
  10. #define TRACE_SYSTEM vfio_ccw
  11. #if !defined(_VFIO_CCW_TRACE_) || defined(TRACE_HEADER_MULTI_READ)
  12. #define _VFIO_CCW_TRACE_
  13. #include <linux/tracepoint.h>
  14. TRACE_EVENT(vfio_ccw_io_fctl,
  15. TP_PROTO(int fctl, struct subchannel_id schid, int errno, char *errstr),
  16. TP_ARGS(fctl, schid, errno, errstr),
  17. TP_STRUCT__entry(
  18. __field(int, fctl)
  19. __field_struct(struct subchannel_id, schid)
  20. __field(int, errno)
  21. __field(char*, errstr)
  22. ),
  23. TP_fast_assign(
  24. __entry->fctl = fctl;
  25. __entry->schid = schid;
  26. __entry->errno = errno;
  27. __entry->errstr = errstr;
  28. ),
  29. TP_printk("schid=%x.%x.%04x fctl=%x errno=%d info=%s",
  30. __entry->schid.cssid,
  31. __entry->schid.ssid,
  32. __entry->schid.sch_no,
  33. __entry->fctl,
  34. __entry->errno,
  35. __entry->errstr)
  36. );
  37. #endif /* _VFIO_CCW_TRACE_ */
  38. /* This part must be outside protection */
  39. #undef TRACE_INCLUDE_PATH
  40. #define TRACE_INCLUDE_PATH .
  41. #undef TRACE_INCLUDE_FILE
  42. #define TRACE_INCLUDE_FILE vfio_ccw_trace
  43. #include <trace/define_trace.h>