7d52cb88c9
We might as well dump the drm_file pointer, that's about as useful a cookie as the pid. Noticed while typing docs for drm_file and friends. Since the only consumer of this is the tracepoints I think we can safely change this - those tracepoints should not be uapi relevant at all. It all goes back to commit b9c2c9ae882f058084e13e339925dbf8d2d20271 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu Jul 1 16:48:09 2010 -0700 drm: add per-event vblank event trace points which doesn't give a special justification for using pid over a pointer. Also note that the nouveau code setting it is entirely pointless: Since this isn't a vblank event, it will never hit the vblank tracepoints. Cc: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-11-daniel.vetter@ffwll.ch
66 lines
1.7 KiB
C
66 lines
1.7 KiB
C
#if !defined(_DRM_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _DRM_TRACE_H_
|
|
|
|
#include <linux/stringify.h>
|
|
#include <linux/types.h>
|
|
#include <linux/tracepoint.h>
|
|
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM drm
|
|
#define TRACE_INCLUDE_FILE drm_trace
|
|
|
|
TRACE_EVENT(drm_vblank_event,
|
|
TP_PROTO(int crtc, unsigned int seq),
|
|
TP_ARGS(crtc, seq),
|
|
TP_STRUCT__entry(
|
|
__field(int, crtc)
|
|
__field(unsigned int, seq)
|
|
),
|
|
TP_fast_assign(
|
|
__entry->crtc = crtc;
|
|
__entry->seq = seq;
|
|
),
|
|
TP_printk("crtc=%d, seq=%u", __entry->crtc, __entry->seq)
|
|
);
|
|
|
|
TRACE_EVENT(drm_vblank_event_queued,
|
|
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)
|
|
);
|
|
|
|
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)
|
|
);
|
|
|
|
#endif /* _DRM_TRACE_H_ */
|
|
|
|
/* This part must be outside protection */
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH .
|
|
#include <trace/define_trace.h>
|