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