From: Sean Paul <seanpaul@xxxxxxxxxxxx> We can use an event class to remove some boilerplate for the event queued/delivered trace events. Signed-off-by: Sean Paul <seanpaul@xxxxxxxxxxxx> --- drivers/gpu/drm/drm_trace.h | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/drm_trace.h b/drivers/gpu/drm/drm_trace.h index 11c6dd577e8ed..487bc3478efec 100644 --- a/drivers/gpu/drm/drm_trace.h +++ b/drivers/gpu/drm/drm_trace.h @@ -32,7 +32,7 @@ TRACE_EVENT(drm_vblank_event, __entry->high_prec ? "true" : "false") ); -TRACE_EVENT(drm_vblank_event_queued, +DECLARE_EVENT_CLASS(class_drm_vblank_event, TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), TP_ARGS(file, crtc, seq), TP_STRUCT__entry( @@ -45,25 +45,16 @@ TRACE_EVENT(drm_vblank_event_queued, __entry->crtc = crtc; __entry->seq = seq; ), - TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, \ + TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, __entry->seq) ); - -TRACE_EVENT(drm_vblank_event_delivered, - TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), - TP_ARGS(file, crtc, seq), - TP_STRUCT__entry( - __field(struct drm_file *, file) - __field(int, crtc) - __field(unsigned int, seq) - ), - TP_fast_assign( - __entry->file = file; - __entry->crtc = crtc; - __entry->seq = seq; - ), - TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, \ - __entry->seq) +DEFINE_EVENT(class_drm_vblank_event, drm_vblank_event_queued, + TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), + TP_ARGS(file, crtc, seq) +); +DEFINE_EVENT(class_drm_vblank_event, drm_vblank_event_delivered, + TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), + TP_ARGS(file, crtc, seq) ); #endif /* _DRM_TRACE_H_ */ -- Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel