0001
0002 #if !defined(_TRACE_PWC_H) || defined(TRACE_HEADER_MULTI_READ)
0003 #define _TRACE_PWC_H
0004
0005 #include <linux/usb.h>
0006 #include <linux/tracepoint.h>
0007
0008 #undef TRACE_SYSTEM
0009 #define TRACE_SYSTEM pwc
0010
0011 TRACE_EVENT(pwc_handler_enter,
0012 TP_PROTO(struct urb *urb, struct pwc_device *pdev),
0013 TP_ARGS(urb, pdev),
0014 TP_STRUCT__entry(
0015 __field(struct urb*, urb)
0016 __field(struct pwc_frame_buf*, fbuf)
0017 __field(int, urb__status)
0018 __field(u32, urb__actual_length)
0019 __field(int, fbuf__filled)
0020 __string(name, pdev->v4l2_dev.name)
0021 ),
0022 TP_fast_assign(
0023 __entry->urb = urb;
0024 __entry->fbuf = pdev->fill_buf;
0025 __entry->urb__status = urb->status;
0026 __entry->urb__actual_length = urb->actual_length;
0027 __entry->fbuf__filled = (pdev->fill_buf
0028 ? pdev->fill_buf->filled : 0);
0029 __assign_str(name, pdev->v4l2_dev.name);
0030 ),
0031 TP_printk("dev=%s (fbuf=%p filled=%d) urb=%p (status=%d actual_length=%u)",
0032 __get_str(name),
0033 __entry->fbuf,
0034 __entry->fbuf__filled,
0035 __entry->urb,
0036 __entry->urb__status,
0037 __entry->urb__actual_length)
0038 );
0039
0040 TRACE_EVENT(pwc_handler_exit,
0041 TP_PROTO(struct urb *urb, struct pwc_device *pdev),
0042 TP_ARGS(urb, pdev),
0043 TP_STRUCT__entry(
0044 __field(struct urb*, urb)
0045 __field(struct pwc_frame_buf*, fbuf)
0046 __field(int, fbuf__filled)
0047 __string(name, pdev->v4l2_dev.name)
0048 ),
0049 TP_fast_assign(
0050 __entry->urb = urb;
0051 __entry->fbuf = pdev->fill_buf;
0052 __entry->fbuf__filled = pdev->fill_buf->filled;
0053 __assign_str(name, pdev->v4l2_dev.name);
0054 ),
0055 TP_printk(" dev=%s (fbuf=%p filled=%d) urb=%p",
0056 __get_str(name),
0057 __entry->fbuf,
0058 __entry->fbuf__filled,
0059 __entry->urb)
0060 );
0061
0062 #endif
0063
0064
0065 #include <trace/define_trace.h>