xhci-trace.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * xHCI host controller driver
  3. *
  4. * Copyright (C) 2013 Xenia Ragiadakou
  5. *
  6. * Author: Xenia Ragiadakou
  7. * Email : burzalodowa@gmail.com
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #undef TRACE_SYSTEM
  14. #define TRACE_SYSTEM xhci-hcd
  15. #if !defined(__XHCI_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
  16. #define __XHCI_TRACE_H
  17. #include <linux/tracepoint.h>
  18. #define XHCI_MSG_MAX 500
  19. DECLARE_EVENT_CLASS(xhci_log_msg,
  20. TP_PROTO(struct va_format *vaf),
  21. TP_ARGS(vaf),
  22. TP_STRUCT__entry(__dynamic_array(char, msg, XHCI_MSG_MAX)),
  23. TP_fast_assign(
  24. vsnprintf(__get_str(msg), XHCI_MSG_MAX, vaf->fmt, *vaf->va);
  25. ),
  26. TP_printk("%s", __get_str(msg))
  27. );
  28. DEFINE_EVENT(xhci_log_msg, xhci_dbg_address,
  29. TP_PROTO(struct va_format *vaf),
  30. TP_ARGS(vaf)
  31. );
  32. DEFINE_EVENT(xhci_log_msg, xhci_dbg_context_change,
  33. TP_PROTO(struct va_format *vaf),
  34. TP_ARGS(vaf)
  35. );
  36. DEFINE_EVENT(xhci_log_msg, xhci_dbg_quirks,
  37. TP_PROTO(struct va_format *vaf),
  38. TP_ARGS(vaf)
  39. );
  40. #endif /* __XHCI_TRACE_H */
  41. /* this part must be outside header guard */
  42. #undef TRACE_INCLUDE_PATH
  43. #define TRACE_INCLUDE_PATH .
  44. #undef TRACE_INCLUDE_FILE
  45. #define TRACE_INCLUDE_FILE xhci-trace
  46. #include <trace/define_trace.h>