Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 1 | #if !defined(_AMDGPU_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) |
| 2 | #define _AMDGPU_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 amdgpu |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 12 | #define TRACE_INCLUDE_FILE amdgpu_trace |
| 13 | |
Tom St Denis | f4b373f | 2016-05-31 08:02:27 -0400 | [diff] [blame] | 14 | TRACE_EVENT(amdgpu_mm_rreg, |
| 15 | TP_PROTO(unsigned did, uint32_t reg, uint32_t value), |
| 16 | TP_ARGS(did, reg, value), |
| 17 | TP_STRUCT__entry( |
| 18 | __field(unsigned, did) |
| 19 | __field(uint32_t, reg) |
| 20 | __field(uint32_t, value) |
| 21 | ), |
| 22 | TP_fast_assign( |
| 23 | __entry->did = did; |
| 24 | __entry->reg = reg; |
| 25 | __entry->value = value; |
| 26 | ), |
Tom St Denis | e11666e | 2016-12-14 10:52:00 -0500 | [diff] [blame] | 27 | TP_printk("0x%04lx, 0x%08lx, 0x%08lx", |
Tom St Denis | f4b373f | 2016-05-31 08:02:27 -0400 | [diff] [blame] | 28 | (unsigned long)__entry->did, |
| 29 | (unsigned long)__entry->reg, |
| 30 | (unsigned long)__entry->value) |
| 31 | ); |
| 32 | |
| 33 | TRACE_EVENT(amdgpu_mm_wreg, |
| 34 | TP_PROTO(unsigned did, uint32_t reg, uint32_t value), |
| 35 | TP_ARGS(did, reg, value), |
| 36 | TP_STRUCT__entry( |
| 37 | __field(unsigned, did) |
| 38 | __field(uint32_t, reg) |
| 39 | __field(uint32_t, value) |
| 40 | ), |
| 41 | TP_fast_assign( |
| 42 | __entry->did = did; |
| 43 | __entry->reg = reg; |
| 44 | __entry->value = value; |
| 45 | ), |
Tom St Denis | e11666e | 2016-12-14 10:52:00 -0500 | [diff] [blame] | 46 | TP_printk("0x%04lx, 0x%08lx, 0x%08lx", |
Tom St Denis | f4b373f | 2016-05-31 08:02:27 -0400 | [diff] [blame] | 47 | (unsigned long)__entry->did, |
| 48 | (unsigned long)__entry->reg, |
| 49 | (unsigned long)__entry->value) |
| 50 | ); |
| 51 | |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 52 | TRACE_EVENT(amdgpu_bo_create, |
| 53 | TP_PROTO(struct amdgpu_bo *bo), |
| 54 | TP_ARGS(bo), |
| 55 | TP_STRUCT__entry( |
| 56 | __field(struct amdgpu_bo *, bo) |
| 57 | __field(u32, pages) |
David Mao | 42ffb58 | 2016-06-07 17:43:51 +0800 | [diff] [blame] | 58 | __field(u32, type) |
| 59 | __field(u32, prefer) |
| 60 | __field(u32, allow) |
| 61 | __field(u32, visible) |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 62 | ), |
| 63 | |
| 64 | TP_fast_assign( |
| 65 | __entry->bo = bo; |
| 66 | __entry->pages = bo->tbo.num_pages; |
David Mao | 42ffb58 | 2016-06-07 17:43:51 +0800 | [diff] [blame] | 67 | __entry->type = bo->tbo.mem.mem_type; |
| 68 | __entry->prefer = bo->prefered_domains; |
| 69 | __entry->allow = bo->allowed_domains; |
| 70 | __entry->visible = bo->flags; |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 71 | ), |
David Mao | 42ffb58 | 2016-06-07 17:43:51 +0800 | [diff] [blame] | 72 | |
Andres Rodriguez | 373eadf | 2017-03-09 21:25:51 -0500 | [diff] [blame] | 73 | TP_printk("bo=%p, pages=%u, type=%d, prefered=%d, allowed=%d, visible=%d", |
David Mao | 42ffb58 | 2016-06-07 17:43:51 +0800 | [diff] [blame] | 74 | __entry->bo, __entry->pages, __entry->type, |
| 75 | __entry->prefer, __entry->allow, __entry->visible) |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 76 | ); |
| 77 | |
| 78 | TRACE_EVENT(amdgpu_cs, |
| 79 | TP_PROTO(struct amdgpu_cs_parser *p, int i), |
| 80 | TP_ARGS(p, i), |
| 81 | TP_STRUCT__entry( |
Christian König | e30590e | 2015-06-10 19:21:14 +0200 | [diff] [blame] | 82 | __field(struct amdgpu_bo_list *, bo_list) |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 83 | __field(u32, ring) |
| 84 | __field(u32, dw) |
| 85 | __field(u32, fences) |
| 86 | ), |
| 87 | |
| 88 | TP_fast_assign( |
Christian König | e30590e | 2015-06-10 19:21:14 +0200 | [diff] [blame] | 89 | __entry->bo_list = p->bo_list; |
Christian König | b07c60c | 2016-01-31 12:29:04 +0100 | [diff] [blame] | 90 | __entry->ring = p->job->ring->idx; |
Christian König | 50838c8 | 2016-02-03 13:44:52 +0100 | [diff] [blame] | 91 | __entry->dw = p->job->ibs[i].length_dw; |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 92 | __entry->fences = amdgpu_fence_count_emitted( |
Christian König | b07c60c | 2016-01-31 12:29:04 +0100 | [diff] [blame] | 93 | p->job->ring); |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 94 | ), |
Christian König | e30590e | 2015-06-10 19:21:14 +0200 | [diff] [blame] | 95 | TP_printk("bo_list=%p, ring=%u, dw=%u, fences=%u", |
| 96 | __entry->bo_list, __entry->ring, __entry->dw, |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 97 | __entry->fences) |
| 98 | ); |
| 99 | |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 100 | TRACE_EVENT(amdgpu_cs_ioctl, |
| 101 | TP_PROTO(struct amdgpu_job *job), |
| 102 | TP_ARGS(job), |
| 103 | TP_STRUCT__entry( |
| 104 | __field(struct amdgpu_device *, adev) |
Andres Rodriguez | f6fd203 | 2017-03-09 21:25:52 -0500 | [diff] [blame^] | 105 | __field(uint64_t, sched_job_id) |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 106 | __field(struct amdgpu_ib *, ib) |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 107 | __field(struct dma_fence *, fence) |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 108 | __field(char *, ring_name) |
| 109 | __field(u32, num_ibs) |
| 110 | ), |
| 111 | |
| 112 | TP_fast_assign( |
| 113 | __entry->adev = job->adev; |
Andres Rodriguez | f6fd203 | 2017-03-09 21:25:52 -0500 | [diff] [blame^] | 114 | __entry->sched_job_id = job->base.id; |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 115 | __entry->ib = job->ibs; |
Christian König | 6fc1367 | 2016-05-20 12:53:52 +0200 | [diff] [blame] | 116 | __entry->fence = &job->base.s_fence->finished; |
Christian König | b07c60c | 2016-01-31 12:29:04 +0100 | [diff] [blame] | 117 | __entry->ring_name = job->ring->name; |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 118 | __entry->num_ibs = job->num_ibs; |
| 119 | ), |
Andres Rodriguez | f6fd203 | 2017-03-09 21:25:52 -0500 | [diff] [blame^] | 120 | TP_printk("adev=%p, sched_job=%llu, first_ib=%p, sched_fence=%p, ring_name=%s, num_ibs=%u", |
| 121 | __entry->adev, __entry->sched_job_id, __entry->ib, |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 122 | __entry->fence, __entry->ring_name, __entry->num_ibs) |
| 123 | ); |
| 124 | |
| 125 | TRACE_EVENT(amdgpu_sched_run_job, |
| 126 | TP_PROTO(struct amdgpu_job *job), |
| 127 | TP_ARGS(job), |
| 128 | TP_STRUCT__entry( |
| 129 | __field(struct amdgpu_device *, adev) |
Andres Rodriguez | f6fd203 | 2017-03-09 21:25:52 -0500 | [diff] [blame^] | 130 | __field(uint64_t, sched_job_id) |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 131 | __field(struct amdgpu_ib *, ib) |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 132 | __field(struct dma_fence *, fence) |
Andres Rodriguez | 82c6bd4 | 2017-02-24 13:20:58 -0500 | [diff] [blame] | 133 | __string(timeline, job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished)) |
| 134 | __field(unsigned int, context) |
| 135 | __field(unsigned int, seqno) |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 136 | __field(char *, ring_name) |
| 137 | __field(u32, num_ibs) |
| 138 | ), |
| 139 | |
| 140 | TP_fast_assign( |
| 141 | __entry->adev = job->adev; |
Andres Rodriguez | f6fd203 | 2017-03-09 21:25:52 -0500 | [diff] [blame^] | 142 | __entry->sched_job_id = job->base.id; |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 143 | __entry->ib = job->ibs; |
Christian König | 6fc1367 | 2016-05-20 12:53:52 +0200 | [diff] [blame] | 144 | __entry->fence = &job->base.s_fence->finished; |
Andres Rodriguez | 82c6bd4 | 2017-02-24 13:20:58 -0500 | [diff] [blame] | 145 | __assign_str(timeline, job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished)) |
| 146 | __entry->context = job->base.s_fence->finished.context; |
| 147 | __entry->seqno = job->base.s_fence->finished.seqno; |
Christian König | b07c60c | 2016-01-31 12:29:04 +0100 | [diff] [blame] | 148 | __entry->ring_name = job->ring->name; |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 149 | __entry->num_ibs = job->num_ibs; |
| 150 | ), |
Andres Rodriguez | f6fd203 | 2017-03-09 21:25:52 -0500 | [diff] [blame^] | 151 | TP_printk("adev=%p, sched_job=%llu, first_ib=%p, sched_fence=%p, timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u", |
| 152 | __entry->adev, __entry->sched_job_id, __entry->ib, |
Andres Rodriguez | 82c6bd4 | 2017-02-24 13:20:58 -0500 | [diff] [blame] | 153 | __entry->fence, __get_str(timeline), __entry->context, __entry->seqno, |
| 154 | __entry->ring_name, __entry->num_ibs) |
Chunming Zhou | 7034dec | 2015-11-11 14:56:00 +0800 | [diff] [blame] | 155 | ); |
| 156 | |
| 157 | |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 158 | TRACE_EVENT(amdgpu_vm_grab_id, |
Christian König | 0c0fdf1 | 2016-07-08 10:48:24 +0200 | [diff] [blame] | 159 | TP_PROTO(struct amdgpu_vm *vm, int ring, struct amdgpu_job *job), |
| 160 | TP_ARGS(vm, ring, job), |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 161 | TP_STRUCT__entry( |
Christian König | 165e4e0 | 2016-01-07 18:15:22 +0100 | [diff] [blame] | 162 | __field(struct amdgpu_vm *, vm) |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 163 | __field(u32, ring) |
Christian König | 22073fe | 2016-02-26 16:18:36 +0100 | [diff] [blame] | 164 | __field(u32, vmid) |
| 165 | __field(u64, pd_addr) |
Christian König | 0c0fdf1 | 2016-07-08 10:48:24 +0200 | [diff] [blame] | 166 | __field(u32, needs_flush) |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 167 | ), |
| 168 | |
| 169 | TP_fast_assign( |
Christian König | 165e4e0 | 2016-01-07 18:15:22 +0100 | [diff] [blame] | 170 | __entry->vm = vm; |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 171 | __entry->ring = ring; |
Christian König | 0c0fdf1 | 2016-07-08 10:48:24 +0200 | [diff] [blame] | 172 | __entry->vmid = job->vm_id; |
| 173 | __entry->pd_addr = job->vm_pd_addr; |
| 174 | __entry->needs_flush = job->vm_needs_flush; |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 175 | ), |
Christian König | 0c0fdf1 | 2016-07-08 10:48:24 +0200 | [diff] [blame] | 176 | TP_printk("vm=%p, ring=%u, id=%u, pd_addr=%010Lx needs_flush=%u", |
| 177 | __entry->vm, __entry->ring, __entry->vmid, |
| 178 | __entry->pd_addr, __entry->needs_flush) |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 179 | ); |
| 180 | |
Christian König | 93e3e43 | 2015-06-09 16:58:33 +0200 | [diff] [blame] | 181 | TRACE_EVENT(amdgpu_vm_bo_map, |
| 182 | TP_PROTO(struct amdgpu_bo_va *bo_va, |
| 183 | struct amdgpu_bo_va_mapping *mapping), |
| 184 | TP_ARGS(bo_va, mapping), |
| 185 | TP_STRUCT__entry( |
| 186 | __field(struct amdgpu_bo *, bo) |
| 187 | __field(long, start) |
| 188 | __field(long, last) |
| 189 | __field(u64, offset) |
| 190 | __field(u32, flags) |
| 191 | ), |
| 192 | |
| 193 | TP_fast_assign( |
| 194 | __entry->bo = bo_va->bo; |
| 195 | __entry->start = mapping->it.start; |
| 196 | __entry->last = mapping->it.last; |
| 197 | __entry->offset = mapping->offset; |
| 198 | __entry->flags = mapping->flags; |
| 199 | ), |
| 200 | TP_printk("bo=%p, start=%lx, last=%lx, offset=%010llx, flags=%08x", |
| 201 | __entry->bo, __entry->start, __entry->last, |
| 202 | __entry->offset, __entry->flags) |
| 203 | ); |
| 204 | |
| 205 | TRACE_EVENT(amdgpu_vm_bo_unmap, |
| 206 | TP_PROTO(struct amdgpu_bo_va *bo_va, |
| 207 | struct amdgpu_bo_va_mapping *mapping), |
| 208 | TP_ARGS(bo_va, mapping), |
| 209 | TP_STRUCT__entry( |
| 210 | __field(struct amdgpu_bo *, bo) |
| 211 | __field(long, start) |
| 212 | __field(long, last) |
| 213 | __field(u64, offset) |
| 214 | __field(u32, flags) |
| 215 | ), |
| 216 | |
| 217 | TP_fast_assign( |
| 218 | __entry->bo = bo_va->bo; |
| 219 | __entry->start = mapping->it.start; |
| 220 | __entry->last = mapping->it.last; |
| 221 | __entry->offset = mapping->offset; |
| 222 | __entry->flags = mapping->flags; |
| 223 | ), |
| 224 | TP_printk("bo=%p, start=%lx, last=%lx, offset=%010llx, flags=%08x", |
| 225 | __entry->bo, __entry->start, __entry->last, |
| 226 | __entry->offset, __entry->flags) |
| 227 | ); |
| 228 | |
Christian König | d6c10f6 | 2015-09-28 12:00:23 +0200 | [diff] [blame] | 229 | DECLARE_EVENT_CLASS(amdgpu_vm_mapping, |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 230 | TP_PROTO(struct amdgpu_bo_va_mapping *mapping), |
| 231 | TP_ARGS(mapping), |
| 232 | TP_STRUCT__entry( |
| 233 | __field(u64, soffset) |
| 234 | __field(u64, eoffset) |
| 235 | __field(u32, flags) |
| 236 | ), |
| 237 | |
| 238 | TP_fast_assign( |
| 239 | __entry->soffset = mapping->it.start; |
| 240 | __entry->eoffset = mapping->it.last + 1; |
| 241 | __entry->flags = mapping->flags; |
| 242 | ), |
| 243 | TP_printk("soffs=%010llx, eoffs=%010llx, flags=%08x", |
| 244 | __entry->soffset, __entry->eoffset, __entry->flags) |
| 245 | ); |
| 246 | |
Christian König | d6c10f6 | 2015-09-28 12:00:23 +0200 | [diff] [blame] | 247 | DEFINE_EVENT(amdgpu_vm_mapping, amdgpu_vm_bo_update, |
| 248 | TP_PROTO(struct amdgpu_bo_va_mapping *mapping), |
| 249 | TP_ARGS(mapping) |
| 250 | ); |
| 251 | |
| 252 | DEFINE_EVENT(amdgpu_vm_mapping, amdgpu_vm_bo_mapping, |
| 253 | TP_PROTO(struct amdgpu_bo_va_mapping *mapping), |
| 254 | TP_ARGS(mapping) |
| 255 | ); |
| 256 | |
Christian König | ec2f05f | 2016-09-25 16:11:52 +0200 | [diff] [blame] | 257 | TRACE_EVENT(amdgpu_vm_set_ptes, |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 258 | TP_PROTO(uint64_t pe, uint64_t addr, unsigned count, |
| 259 | uint32_t incr, uint32_t flags), |
| 260 | TP_ARGS(pe, addr, count, incr, flags), |
| 261 | TP_STRUCT__entry( |
| 262 | __field(u64, pe) |
| 263 | __field(u64, addr) |
| 264 | __field(u32, count) |
| 265 | __field(u32, incr) |
| 266 | __field(u32, flags) |
| 267 | ), |
| 268 | |
| 269 | TP_fast_assign( |
| 270 | __entry->pe = pe; |
| 271 | __entry->addr = addr; |
| 272 | __entry->count = count; |
| 273 | __entry->incr = incr; |
| 274 | __entry->flags = flags; |
| 275 | ), |
| 276 | TP_printk("pe=%010Lx, addr=%010Lx, incr=%u, flags=%08x, count=%u", |
| 277 | __entry->pe, __entry->addr, __entry->incr, |
| 278 | __entry->flags, __entry->count) |
| 279 | ); |
| 280 | |
Christian König | ec2f05f | 2016-09-25 16:11:52 +0200 | [diff] [blame] | 281 | TRACE_EVENT(amdgpu_vm_copy_ptes, |
| 282 | TP_PROTO(uint64_t pe, uint64_t src, unsigned count), |
| 283 | TP_ARGS(pe, src, count), |
| 284 | TP_STRUCT__entry( |
| 285 | __field(u64, pe) |
| 286 | __field(u64, src) |
| 287 | __field(u32, count) |
| 288 | ), |
| 289 | |
| 290 | TP_fast_assign( |
| 291 | __entry->pe = pe; |
| 292 | __entry->src = src; |
| 293 | __entry->count = count; |
| 294 | ), |
| 295 | TP_printk("pe=%010Lx, src=%010Lx, count=%u", |
| 296 | __entry->pe, __entry->src, __entry->count) |
| 297 | ); |
| 298 | |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 299 | TRACE_EVENT(amdgpu_vm_flush, |
| 300 | TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id), |
| 301 | TP_ARGS(pd_addr, ring, id), |
| 302 | TP_STRUCT__entry( |
| 303 | __field(u64, pd_addr) |
| 304 | __field(u32, ring) |
| 305 | __field(u32, id) |
| 306 | ), |
| 307 | |
| 308 | TP_fast_assign( |
| 309 | __entry->pd_addr = pd_addr; |
| 310 | __entry->ring = ring; |
| 311 | __entry->id = id; |
| 312 | ), |
Christian König | 22073fe | 2016-02-26 16:18:36 +0100 | [diff] [blame] | 313 | TP_printk("ring=%u, id=%u, pd_addr=%010Lx", |
| 314 | __entry->ring, __entry->id, __entry->pd_addr) |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 315 | ); |
| 316 | |
Christian König | ec74407 | 2015-06-10 14:45:21 +0200 | [diff] [blame] | 317 | TRACE_EVENT(amdgpu_bo_list_set, |
| 318 | TP_PROTO(struct amdgpu_bo_list *list, struct amdgpu_bo *bo), |
| 319 | TP_ARGS(list, bo), |
| 320 | TP_STRUCT__entry( |
| 321 | __field(struct amdgpu_bo_list *, list) |
| 322 | __field(struct amdgpu_bo *, bo) |
David Mao | 42ffb58 | 2016-06-07 17:43:51 +0800 | [diff] [blame] | 323 | __field(u64, bo_size) |
Christian König | ec74407 | 2015-06-10 14:45:21 +0200 | [diff] [blame] | 324 | ), |
| 325 | |
| 326 | TP_fast_assign( |
| 327 | __entry->list = list; |
| 328 | __entry->bo = bo; |
David Mao | 42ffb58 | 2016-06-07 17:43:51 +0800 | [diff] [blame] | 329 | __entry->bo_size = amdgpu_bo_size(bo); |
Christian König | ec74407 | 2015-06-10 14:45:21 +0200 | [diff] [blame] | 330 | ), |
Andres Rodriguez | 373eadf | 2017-03-09 21:25:51 -0500 | [diff] [blame] | 331 | TP_printk("list=%p, bo=%p, bo_size=%Ld", |
David Mao | 42ffb58 | 2016-06-07 17:43:51 +0800 | [diff] [blame] | 332 | __entry->list, |
| 333 | __entry->bo, |
| 334 | __entry->bo_size) |
Christian König | ec74407 | 2015-06-10 14:45:21 +0200 | [diff] [blame] | 335 | ); |
| 336 | |
David Mao | 15da301 | 2016-06-07 17:48:52 +0800 | [diff] [blame] | 337 | TRACE_EVENT(amdgpu_cs_bo_status, |
| 338 | TP_PROTO(uint64_t total_bo, uint64_t total_size), |
| 339 | TP_ARGS(total_bo, total_size), |
| 340 | TP_STRUCT__entry( |
| 341 | __field(u64, total_bo) |
| 342 | __field(u64, total_size) |
| 343 | ), |
| 344 | |
| 345 | TP_fast_assign( |
| 346 | __entry->total_bo = total_bo; |
| 347 | __entry->total_size = total_size; |
| 348 | ), |
Andres Rodriguez | 373eadf | 2017-03-09 21:25:51 -0500 | [diff] [blame] | 349 | TP_printk("total_bo_size=%Ld, total_bo_count=%Ld", |
David Mao | 15da301 | 2016-06-07 17:48:52 +0800 | [diff] [blame] | 350 | __entry->total_bo, __entry->total_size) |
| 351 | ); |
| 352 | |
| 353 | TRACE_EVENT(amdgpu_ttm_bo_move, |
| 354 | TP_PROTO(struct amdgpu_bo* bo, uint32_t new_placement, uint32_t old_placement), |
| 355 | TP_ARGS(bo, new_placement, old_placement), |
| 356 | TP_STRUCT__entry( |
| 357 | __field(struct amdgpu_bo *, bo) |
| 358 | __field(u64, bo_size) |
| 359 | __field(u32, new_placement) |
| 360 | __field(u32, old_placement) |
| 361 | ), |
| 362 | |
| 363 | TP_fast_assign( |
| 364 | __entry->bo = bo; |
| 365 | __entry->bo_size = amdgpu_bo_size(bo); |
| 366 | __entry->new_placement = new_placement; |
| 367 | __entry->old_placement = old_placement; |
| 368 | ), |
Andres Rodriguez | f8d5690 | 2017-02-24 13:20:57 -0500 | [diff] [blame] | 369 | TP_printk("bo=%p, from=%d, to=%d, size=%Ld", |
David Mao | 15da301 | 2016-06-07 17:48:52 +0800 | [diff] [blame] | 370 | __entry->bo, __entry->old_placement, |
| 371 | __entry->new_placement, __entry->bo_size) |
| 372 | ); |
| 373 | |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 374 | #endif |
| 375 | |
| 376 | /* This part must be outside protection */ |
| 377 | #undef TRACE_INCLUDE_PATH |
| 378 | #define TRACE_INCLUDE_PATH . |
| 379 | #include <trace/define_trace.h> |