1 #if !defined(_RADEON_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define _RADEON_TRACE_H_
4 #include <linux/stringify.h>
5 #include <linux/types.h>
6 #include <linux/tracepoint.h>
11 #define TRACE_SYSTEM radeon
12 #define TRACE_INCLUDE_FILE radeon_trace
14 TRACE_EVENT(radeon_bo_create,
15 TP_PROTO(struct radeon_bo *bo),
18 __field(struct radeon_bo *, bo)
24 __entry->pages = bo->tbo.num_pages;
26 TP_printk("bo=%p, pages=%u", __entry->bo, __entry->pages)
29 TRACE_EVENT(radeon_cs,
30 TP_PROTO(struct radeon_cs_parser *p),
39 __entry->ring = p->ring;
40 __entry->dw = p->chunk_ib->length_dw;
41 __entry->fences = radeon_fence_count_emitted(
44 TP_printk("ring=%u, dw=%u, fences=%u",
45 __entry->ring, __entry->dw,
49 TRACE_EVENT(radeon_vm_grab_id,
50 TP_PROTO(unsigned vmid, int ring),
61 TP_printk("vmid=%u, ring=%u", __entry->vmid, __entry->ring)
64 TRACE_EVENT(radeon_vm_bo_update,
65 TP_PROTO(struct radeon_bo_va *bo_va),
74 __entry->soffset = bo_va->it.start;
75 __entry->eoffset = bo_va->it.last + 1;
76 __entry->flags = bo_va->flags;
78 TP_printk("soffs=%010llx, eoffs=%010llx, flags=%08x",
79 __entry->soffset, __entry->eoffset, __entry->flags)
82 TRACE_EVENT(radeon_vm_set_page,
83 TP_PROTO(uint64_t pe, uint64_t addr, unsigned count,
84 uint32_t incr, uint32_t flags),
85 TP_ARGS(pe, addr, count, incr, flags),
97 __entry->count = count;
99 __entry->flags = flags;
101 TP_printk("pe=%010Lx, addr=%010Lx, incr=%u, flags=%08x, count=%u",
102 __entry->pe, __entry->addr, __entry->incr,
103 __entry->flags, __entry->count)
106 TRACE_EVENT(radeon_vm_flush,
107 TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id),
108 TP_ARGS(pd_addr, ring, id),
110 __field(u64, pd_addr)
116 __entry->pd_addr = pd_addr;
117 __entry->ring = ring;
120 TP_printk("pd_addr=%010Lx, ring=%u, id=%u",
121 __entry->pd_addr, __entry->ring, __entry->id)
124 DECLARE_EVENT_CLASS(radeon_fence_request,
126 TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
128 TP_ARGS(dev, ring, seqno),
137 __entry->dev = dev->primary->index;
138 __entry->ring = ring;
139 __entry->seqno = seqno;
142 TP_printk("dev=%u, ring=%d, seqno=%u",
143 __entry->dev, __entry->ring, __entry->seqno)
146 DEFINE_EVENT(radeon_fence_request, radeon_fence_emit,
148 TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
150 TP_ARGS(dev, ring, seqno)
153 DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_begin,
155 TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
157 TP_ARGS(dev, ring, seqno)
160 DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end,
162 TP_PROTO(struct drm_device *dev, int ring, u32 seqno),
164 TP_ARGS(dev, ring, seqno)
167 DECLARE_EVENT_CLASS(radeon_semaphore_request,
169 TP_PROTO(int ring, struct radeon_semaphore *sem),
175 __field(signed, waiters)
176 __field(uint64_t, gpu_addr)
180 __entry->ring = ring;
181 __entry->waiters = sem->waiters;
182 __entry->gpu_addr = sem->gpu_addr;
185 TP_printk("ring=%u, waiters=%d, addr=%010Lx", __entry->ring,
186 __entry->waiters, __entry->gpu_addr)
189 DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_signale,
191 TP_PROTO(int ring, struct radeon_semaphore *sem),
196 DEFINE_EVENT(radeon_semaphore_request, radeon_semaphore_wait,
198 TP_PROTO(int ring, struct radeon_semaphore *sem),
205 /* This part must be outside protection */
206 #undef TRACE_INCLUDE_PATH
207 #define TRACE_INCLUDE_PATH .
208 #include <trace/define_trace.h>