Dave Airlie | 99ee7fa | 2010-11-23 11:47:49 +1000 | [diff] [blame] | 1 | #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 | |
| 15 | TRACE_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 | |
Christian König | 860024e | 2013-09-07 18:29:01 +0200 | [diff] [blame] | 30 | TRACE_EVENT(radeon_cs, |
| 31 | TP_PROTO(struct radeon_cs_parser *p), |
| 32 | TP_ARGS(p), |
| 33 | TP_STRUCT__entry( |
| 34 | __field(u32, ring) |
| 35 | __field(u32, dw) |
| 36 | __field(u32, fences) |
| 37 | ), |
| 38 | |
| 39 | TP_fast_assign( |
| 40 | __entry->ring = p->ring; |
| 41 | __entry->dw = p->chunks[p->chunk_ib_idx].length_dw; |
| 42 | __entry->fences = radeon_fence_count_emitted( |
| 43 | p->rdev, p->ring); |
| 44 | ), |
| 45 | TP_printk("ring=%u, dw=%u, fences=%u", |
| 46 | __entry->ring, __entry->dw, |
| 47 | __entry->fences) |
| 48 | ); |
| 49 | |
Christian König | 74d360f | 2013-10-29 20:14:48 +0100 | [diff] [blame^] | 50 | TRACE_EVENT(radeon_vm_set_page, |
| 51 | TP_PROTO(uint64_t pe, uint64_t addr, unsigned count, |
| 52 | uint32_t incr, uint32_t flags), |
| 53 | TP_ARGS(pe, addr, count, incr, flags), |
| 54 | TP_STRUCT__entry( |
| 55 | __field(u64, pe) |
| 56 | __field(u64, addr) |
| 57 | __field(u32, count) |
| 58 | __field(u32, incr) |
| 59 | __field(u32, flags) |
| 60 | ), |
| 61 | |
| 62 | TP_fast_assign( |
| 63 | __entry->pe = pe; |
| 64 | __entry->addr = addr; |
| 65 | __entry->count = count; |
| 66 | __entry->incr = incr; |
| 67 | __entry->flags = flags; |
| 68 | ), |
| 69 | TP_printk("pe=%010Lx, addr=%010Lx, incr=%u, flags=%08x, count=%u", |
| 70 | __entry->pe, __entry->addr, __entry->incr, |
| 71 | __entry->flags, __entry->count) |
| 72 | ); |
| 73 | |
Dave Airlie | 99ee7fa | 2010-11-23 11:47:49 +1000 | [diff] [blame] | 74 | DECLARE_EVENT_CLASS(radeon_fence_request, |
| 75 | |
| 76 | TP_PROTO(struct drm_device *dev, u32 seqno), |
| 77 | |
| 78 | TP_ARGS(dev, seqno), |
| 79 | |
| 80 | TP_STRUCT__entry( |
| 81 | __field(u32, dev) |
| 82 | __field(u32, seqno) |
| 83 | ), |
| 84 | |
| 85 | TP_fast_assign( |
| 86 | __entry->dev = dev->primary->index; |
| 87 | __entry->seqno = seqno; |
| 88 | ), |
| 89 | |
| 90 | TP_printk("dev=%u, seqno=%u", __entry->dev, __entry->seqno) |
| 91 | ); |
| 92 | |
| 93 | DEFINE_EVENT(radeon_fence_request, radeon_fence_emit, |
| 94 | |
| 95 | TP_PROTO(struct drm_device *dev, u32 seqno), |
| 96 | |
| 97 | TP_ARGS(dev, seqno) |
| 98 | ); |
| 99 | |
Dave Airlie | 99ee7fa | 2010-11-23 11:47:49 +1000 | [diff] [blame] | 100 | DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_begin, |
| 101 | |
| 102 | TP_PROTO(struct drm_device *dev, u32 seqno), |
| 103 | |
| 104 | TP_ARGS(dev, seqno) |
| 105 | ); |
| 106 | |
| 107 | DEFINE_EVENT(radeon_fence_request, radeon_fence_wait_end, |
| 108 | |
| 109 | TP_PROTO(struct drm_device *dev, u32 seqno), |
| 110 | |
| 111 | TP_ARGS(dev, seqno) |
| 112 | ); |
| 113 | |
| 114 | #endif |
| 115 | |
| 116 | /* This part must be outside protection */ |
| 117 | #undef TRACE_INCLUDE_PATH |
| 118 | #define TRACE_INCLUDE_PATH . |
| 119 | #include <trace/define_trace.h> |