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_SYSTEM_STRING __stringify(TRACE_SYSTEM)
13 #define TRACE_INCLUDE_FILE radeon_trace
15 TRACE_EVENT(radeon_bo_create
,
16 TP_PROTO(struct radeon_bo
*bo
),
19 __field(struct radeon_bo
*, bo
)
25 __entry
->pages
= bo
->tbo
.num_pages
;
27 TP_printk("bo=%p, pages=%u", __entry
->bo
, __entry
->pages
)
30 TRACE_EVENT(radeon_cs
,
31 TP_PROTO(struct radeon_cs_parser
*p
),
40 __entry
->ring
= p
->ring
;
41 __entry
->dw
= p
->chunks
[p
->chunk_ib_idx
].length_dw
;
42 __entry
->fences
= radeon_fence_count_emitted(
45 TP_printk("ring=%u, dw=%u, fences=%u",
46 __entry
->ring
, __entry
->dw
,
50 DECLARE_EVENT_CLASS(radeon_fence_request
,
52 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
62 __entry
->dev
= dev
->primary
->index
;
63 __entry
->seqno
= seqno
;
66 TP_printk("dev=%u, seqno=%u", __entry
->dev
, __entry
->seqno
)
69 DEFINE_EVENT(radeon_fence_request
, radeon_fence_emit
,
71 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
76 DEFINE_EVENT(radeon_fence_request
, radeon_fence_wait_begin
,
78 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
83 DEFINE_EVENT(radeon_fence_request
, radeon_fence_wait_end
,
85 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
92 /* This part must be outside protection */
93 #undef TRACE_INCLUDE_PATH
94 #define TRACE_INCLUDE_PATH .
95 #include <trace/define_trace.h>