xref: /dragonfly/sys/dev/drm/radeon/radeon_trace.h (revision c3762235)
1 /* $FreeBSD: head/sys/dev/drm2/radeon/radeon_trace.h 254885 2013-08-25 19:37:15Z dumbbell $ */
2 
3 #if !defined(_RADEON_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
4 #define _RADEON_TRACE_H_
5 
6 #include <linux/stringify.h>
7 #include <linux/types.h>
8 #include <linux/tracepoint.h>
9 
10 #include <drm/drmP.h>
11 
12 #undef TRACE_SYSTEM
13 #define TRACE_SYSTEM radeon
14 #define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM)
15 #define TRACE_INCLUDE_FILE radeon_trace
16 
17 TRACE_EVENT(radeon_bo_create,
18 	    TP_PROTO(struct radeon_bo *bo),
19 	    TP_ARGS(bo),
20 	    TP_STRUCT__entry(
21 			     __field(struct radeon_bo *, bo)
22 			     __field(u32, pages)
23 			     ),
24 
25 	    TP_fast_assign(
26 			   __entry->bo = bo;
27 			   __entry->pages = bo->tbo.num_pages;
28 			   ),
29 	    TP_printk("bo=%p, pages=%u", __entry->bo, __entry->pages)
30 );
31 
32 DECLARE_EVENT_CLASS(radeon_fence_request,
33 
34 	    TP_PROTO(struct drm_device *dev, u32 seqno),
35 
36 	    TP_ARGS(dev, seqno),
37 
38 	    TP_STRUCT__entry(
39 			     __field(u32, dev)
40 			     __field(u32, seqno)
41 			     ),
42 
43 	    TP_fast_assign(
44 			   __entry->dev = dev->primary->index;
45 			   __entry->seqno = seqno;
46 			   ),
47 
48 	    TP_printk("dev=%u, seqno=%u", __entry->dev, __entry->seqno)
49 );
50 
51 DEFINE_EVENT(radeon_fence_request, radeon_fence_emit,
52 
53 	    TP_PROTO(struct drm_device *dev, u32 seqno),
54 
55 	    TP_ARGS(dev, seqno)
56 );
57 
58 DEFINE_EVENT(radeon_fence_request, radeon_fence_retire,
59 
60 	    TP_PROTO(struct drm_device *dev, u32 seqno),
61 
62 	    TP_ARGS(dev, seqno)
63 );
64 
65 DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_begin,
66 
67 	    TP_PROTO(struct drm_device *dev, u32 seqno),
68 
69 	    TP_ARGS(dev, seqno)
70 );
71 
72 DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end,
73 
74 	    TP_PROTO(struct drm_device *dev, u32 seqno),
75 
76 	    TP_ARGS(dev, seqno)
77 );
78 
79 #endif
80 
81 /* This part must be outside protection */
82 #undef TRACE_INCLUDE_PATH
83 #define TRACE_INCLUDE_PATH .
84 #include <trace/define_trace.h>
85