^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #if !defined(_TRACE_PWC_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _TRACE_PWC_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <linux/usb.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define TRACE_SYSTEM pwc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) TRACE_EVENT(pwc_handler_enter,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) TP_PROTO(struct urb *urb, struct pwc_device *pdev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) TP_ARGS(urb, pdev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) __field(struct urb*, urb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) __field(struct pwc_frame_buf*, fbuf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) __field(int, urb__status)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) __field(u32, urb__actual_length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) __field(int, fbuf__filled)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) __string(name, pdev->v4l2_dev.name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) __entry->urb = urb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) __entry->fbuf = pdev->fill_buf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) __entry->urb__status = urb->status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) __entry->urb__actual_length = urb->actual_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) __entry->fbuf__filled = (pdev->fill_buf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) ? pdev->fill_buf->filled : 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) __assign_str(name, pdev->v4l2_dev.name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) TP_printk("dev=%s (fbuf=%p filled=%d) urb=%p (status=%d actual_length=%u)",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) __get_str(name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) __entry->fbuf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) __entry->fbuf__filled,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) __entry->urb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) __entry->urb__status,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) __entry->urb__actual_length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) TRACE_EVENT(pwc_handler_exit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) TP_PROTO(struct urb *urb, struct pwc_device *pdev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) TP_ARGS(urb, pdev),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) __field(struct urb*, urb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) __field(struct pwc_frame_buf*, fbuf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) __field(int, fbuf__filled)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) __string(name, pdev->v4l2_dev.name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) __entry->urb = urb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) __entry->fbuf = pdev->fill_buf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) __entry->fbuf__filled = pdev->fill_buf->filled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) __assign_str(name, pdev->v4l2_dev.name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) TP_printk(" dev=%s (fbuf=%p filled=%d) urb=%p",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) __get_str(name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) __entry->fbuf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) __entry->fbuf__filled,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) __entry->urb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) #endif /* _TRACE_PWC_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) #include <trace/define_trace.h>