blob: 27cc95f363812516d4c2247b1253edbe19188938 [file] [log] [blame]
Jesse Barnesac2874b2010-07-01 16:47:31 -07001#if !defined(_DRM_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
2#define _DRM_TRACE_H_
3
4#include <linux/stringify.h>
5#include <linux/types.h>
6#include <linux/tracepoint.h>
7
8#undef TRACE_SYSTEM
9#define TRACE_SYSTEM drm
10#define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM)
11#define TRACE_INCLUDE_FILE drm_trace
12
13TRACE_EVENT(drm_vblank_event,
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070014 TP_PROTO(int crtc, unsigned int seq),
15 TP_ARGS(crtc, seq),
16 TP_STRUCT__entry(
17 __field(int, crtc)
18 __field(unsigned int, seq)
19 ),
20 TP_fast_assign(
21 __entry->crtc = crtc;
22 __entry->seq = seq;
23 ),
Seung-Woo Kim04274cd2013-07-01 19:44:14 +090024 TP_printk("crtc=%d, seq=%u", __entry->crtc, __entry->seq)
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070025);
Jesse Barnesac2874b2010-07-01 16:47:31 -070026
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070027TRACE_EVENT(drm_vblank_event_queued,
28 TP_PROTO(pid_t pid, int crtc, unsigned int seq),
29 TP_ARGS(pid, crtc, seq),
30 TP_STRUCT__entry(
31 __field(pid_t, pid)
32 __field(int, crtc)
33 __field(unsigned int, seq)
34 ),
35 TP_fast_assign(
36 __entry->pid = pid;
37 __entry->crtc = crtc;
38 __entry->seq = seq;
39 ),
Seung-Woo Kim04274cd2013-07-01 19:44:14 +090040 TP_printk("pid=%d, crtc=%d, seq=%u", __entry->pid, __entry->crtc, \
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070041 __entry->seq)
42);
Jesse Barnesac2874b2010-07-01 16:47:31 -070043
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070044TRACE_EVENT(drm_vblank_event_delivered,
45 TP_PROTO(pid_t pid, int crtc, unsigned int seq),
46 TP_ARGS(pid, crtc, seq),
47 TP_STRUCT__entry(
48 __field(pid_t, pid)
49 __field(int, crtc)
50 __field(unsigned int, seq)
51 ),
52 TP_fast_assign(
53 __entry->pid = pid;
54 __entry->crtc = crtc;
55 __entry->seq = seq;
56 ),
Seung-Woo Kim04274cd2013-07-01 19:44:14 +090057 TP_printk("pid=%d, crtc=%d, seq=%u", __entry->pid, __entry->crtc, \
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070058 __entry->seq)
Jesse Barnesac2874b2010-07-01 16:47:31 -070059);
60
61#endif /* _DRM_TRACE_H_ */
62
63/* This part must be outside protection */
64#undef TRACE_INCLUDE_PATH
65#define TRACE_INCLUDE_PATH .
66#include <trace/define_trace.h>