Line data Source code
1 : #if !defined(_RADEON_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
2 : #define _RADEON_TRACE_H_
3 :
4 : #include <dev/pci/drm/drmP.h>
5 :
6 : #undef TRACE_SYSTEM
7 : #define TRACE_SYSTEM radeon
8 : #define TRACE_INCLUDE_FILE radeon_trace
9 :
10 0 : TRACE_EVENT(radeon_bo_create,
11 : TP_PROTO(struct radeon_bo *bo),
12 : TP_ARGS(bo),
13 : TP_STRUCT__entry(
14 : __field(struct radeon_bo *, bo)
15 : __field(u32, pages)
16 : ),
17 :
18 : TP_fast_assign(
19 : __entry->bo = bo;
20 : __entry->pages = bo->tbo.num_pages;
21 : ),
22 : TP_printk("bo=%p, pages=%u", __entry->bo, __entry->pages)
23 : );
24 :
25 0 : TRACE_EVENT(radeon_cs,
26 : TP_PROTO(struct radeon_cs_parser *p),
27 : TP_ARGS(p),
28 : TP_STRUCT__entry(
29 : __field(u32, ring)
30 : __field(u32, dw)
31 : __field(u32, fences)
32 : ),
33 :
34 : TP_fast_assign(
35 : __entry->ring = p->ring;
36 : __entry->dw = p->chunk_ib->length_dw;
37 : __entry->fences = radeon_fence_count_emitted(
38 : p->rdev, p->ring);
39 : ),
40 : TP_printk("ring=%u, dw=%u, fences=%u",
41 : __entry->ring, __entry->dw,
42 : __entry->fences)
43 : );
44 :
45 0 : TRACE_EVENT(radeon_vm_grab_id,
46 : TP_PROTO(unsigned vmid, int ring),
47 : TP_ARGS(vmid, ring),
48 : TP_STRUCT__entry(
49 : __field(u32, vmid)
50 : __field(u32, ring)
51 : ),
52 :
53 : TP_fast_assign(
54 : __entry->vmid = vmid;
55 : __entry->ring = ring;
56 : ),
57 : TP_printk("vmid=%u, ring=%u", __entry->vmid, __entry->ring)
58 : );
59 :
60 0 : TRACE_EVENT(radeon_vm_bo_update,
61 : TP_PROTO(struct radeon_bo_va *bo_va),
62 : TP_ARGS(bo_va),
63 : TP_STRUCT__entry(
64 : __field(u64, soffset)
65 : __field(u64, eoffset)
66 : __field(u32, flags)
67 : ),
68 :
69 : TP_fast_assign(
70 : __entry->soffset = bo_va->it.start;
71 : __entry->eoffset = bo_va->it.last + 1;
72 : __entry->flags = bo_va->flags;
73 : ),
74 : TP_printk("soffs=%010llx, eoffs=%010llx, flags=%08x",
75 : __entry->soffset, __entry->eoffset, __entry->flags)
76 : );
77 :
78 0 : TRACE_EVENT(radeon_vm_set_page,
79 : TP_PROTO(uint64_t pe, uint64_t addr, unsigned count,
80 : uint32_t incr, uint32_t flags),
81 : TP_ARGS(pe, addr, count, incr, flags),
82 : TP_STRUCT__entry(
83 : __field(u64, pe)
84 : __field(u64, addr)
85 : __field(u32, count)
86 : __field(u32, incr)
87 : __field(u32, flags)
88 : ),
89 :
90 : TP_fast_assign(
91 : __entry->pe = pe;
92 : __entry->addr = addr;
93 : __entry->count = count;
94 : __entry->incr = incr;
95 : __entry->flags = flags;
96 : ),
97 : TP_printk("pe=%010Lx, addr=%010Lx, incr=%u, flags=%08x, count=%u",
98 : __entry->pe, __entry->addr, __entry->incr,
99 : __entry->flags, __entry->count)
100 : );
101 :
102 0 : TRACE_EVENT(radeon_vm_flush,
103 : TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id),
104 : TP_ARGS(pd_addr, ring, id),
105 : TP_STRUCT__entry(
106 : __field(u64, pd_addr)
107 : __field(u32, ring)
108 : __field(u32, id)
109 : ),
110 :
111 : TP_fast_assign(
112 : __entry->pd_addr = pd_addr;
113 : __entry->ring = ring;
114 : __entry->id = id;
115 : ),
116 : TP_printk("pd_addr=%010Lx, ring=%u, id=%u",
117 : __entry->pd_addr, __entry->ring, __entry->id)
118 : );
119 :
120 : DECLARE_EVENT_CLASS(radeon_fence_request,
121 :
122 : TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
123 :
124 : TP_ARGS(dev, ring, seqno),
125 :
126 : TP_STRUCT__entry(
127 : __field(u32, dev)
128 : __field(int, ring)
129 : __field(u32, seqno)
130 : ),
131 :
132 : TP_fast_assign(
133 : __entry->dev = dev->primary->index;
134 : __entry->ring = ring;
135 : __entry->seqno = seqno;
136 : ),
137 :
138 : TP_printk("dev=%u, ring=%d, seqno=%u",
139 : __entry->dev, __entry->ring, __entry->seqno)
140 : );
141 :
142 0 : DEFINE_EVENT(radeon_fence_request, radeon_fence_emit,
143 :
144 : TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
145 :
146 : TP_ARGS(dev, ring, seqno)
147 : );
148 :
149 0 : DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_begin,
150 :
151 : TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
152 :
153 : TP_ARGS(dev, ring, seqno)
154 : );
155 :
156 0 : DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end,
157 :
158 : TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
159 :
160 : TP_ARGS(dev, ring, seqno)
161 : );
162 :
163 : DECLARE_EVENT_CLASS(radeon_semaphore_request,
164 :
165 : TP_PROTO(int ring, struct radeon_semaphore *sem),
166 :
167 : TP_ARGS(ring, sem),
168 :
169 : TP_STRUCT__entry(
170 : __field(int, ring)
171 : __field(signed, waiters)
172 : __field(uint64_t, gpu_addr)
173 : ),
174 :
175 : TP_fast_assign(
176 : __entry->ring = ring;
177 : __entry->waiters = sem->waiters;
178 : __entry->gpu_addr = sem->gpu_addr;
179 : ),
180 :
181 : TP_printk("ring=%u, waiters=%d, addr=%010Lx", __entry->ring,
182 : __entry->waiters, __entry->gpu_addr)
183 : );
184 :
185 0 : DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_signale,
186 :
187 : TP_PROTO(int ring, struct radeon_semaphore *sem),
188 :
189 : TP_ARGS(ring, sem)
190 : );
191 :
192 0 : DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_wait,
193 :
194 : TP_PROTO(int ring, struct radeon_semaphore *sem),
195 :
196 : TP_ARGS(ring, sem)
197 : );
198 :
199 : #endif
200 :
201 : /* This part must be outside protection */
202 : #undef TRACE_INCLUDE_PATH
203 : #define TRACE_INCLUDE_PATH .
|