vc4_trace.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (C) 2015 Broadcom
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #if !defined(_VC4_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
  9. #define _VC4_TRACE_H_
  10. #include <linux/stringify.h>
  11. #include <linux/types.h>
  12. #include <linux/tracepoint.h>
  13. #undef TRACE_SYSTEM
  14. #define TRACE_SYSTEM vc4
  15. #define TRACE_INCLUDE_FILE vc4_trace
  16. TRACE_EVENT(vc4_wait_for_seqno_begin,
  17. TP_PROTO(struct drm_device *dev, uint64_t seqno, uint64_t timeout),
  18. TP_ARGS(dev, seqno, timeout),
  19. TP_STRUCT__entry(
  20. __field(u32, dev)
  21. __field(u64, seqno)
  22. __field(u64, timeout)
  23. ),
  24. TP_fast_assign(
  25. __entry->dev = dev->primary->index;
  26. __entry->seqno = seqno;
  27. __entry->timeout = timeout;
  28. ),
  29. TP_printk("dev=%u, seqno=%llu, timeout=%llu",
  30. __entry->dev, __entry->seqno, __entry->timeout)
  31. );
  32. TRACE_EVENT(vc4_wait_for_seqno_end,
  33. TP_PROTO(struct drm_device *dev, uint64_t seqno),
  34. TP_ARGS(dev, seqno),
  35. TP_STRUCT__entry(
  36. __field(u32, dev)
  37. __field(u64, seqno)
  38. ),
  39. TP_fast_assign(
  40. __entry->dev = dev->primary->index;
  41. __entry->seqno = seqno;
  42. ),
  43. TP_printk("dev=%u, seqno=%llu",
  44. __entry->dev, __entry->seqno)
  45. );
  46. #endif /* _VC4_TRACE_H_ */
  47. /* This part must be outside protection */
  48. #undef TRACE_INCLUDE_PATH
  49. #define TRACE_INCLUDE_PATH .
  50. #include <trace/define_trace.h>