diff options
author | Christian König <christian.koenig@amd.com> | 2013-09-07 12:29:01 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-11 11:44:33 -0400 |
commit | 860024e5c9f61358917e2a13e9cdf92e75479aca (patch) | |
tree | ca99b29b35bb2267933d9a7aea4dddcd68189572 /drivers/gpu | |
parent | c647dcfde67e5bf443159e70632091d852833408 (diff) |
drm/radeon: add command submission tracepoint
Neither complete nor perfect, but solves my problem at hand
and might be useful in the future.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cs.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_trace.h | 20 |
2 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index a56084410372..27ea00489ecc 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <drm/radeon_drm.h> | 28 | #include <drm/radeon_drm.h> |
29 | #include "radeon_reg.h" | 29 | #include "radeon_reg.h" |
30 | #include "radeon.h" | 30 | #include "radeon.h" |
31 | #include "radeon_trace.h" | ||
31 | 32 | ||
32 | static int radeon_cs_parser_relocs(struct radeon_cs_parser *p) | 33 | static int radeon_cs_parser_relocs(struct radeon_cs_parser *p) |
33 | { | 34 | { |
@@ -559,6 +560,8 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
559 | return r; | 560 | return r; |
560 | } | 561 | } |
561 | 562 | ||
563 | trace_radeon_cs(&parser); | ||
564 | |||
562 | r = radeon_cs_ib_chunk(rdev, &parser); | 565 | r = radeon_cs_ib_chunk(rdev, &parser); |
563 | if (r) { | 566 | if (r) { |
564 | goto out; | 567 | goto out; |
diff --git a/drivers/gpu/drm/radeon/radeon_trace.h b/drivers/gpu/drm/radeon/radeon_trace.h index a7d7c6df68e2..f7e367815964 100644 --- a/drivers/gpu/drm/radeon/radeon_trace.h +++ b/drivers/gpu/drm/radeon/radeon_trace.h | |||
@@ -27,6 +27,26 @@ TRACE_EVENT(radeon_bo_create, | |||
27 | TP_printk("bo=%p, pages=%u", __entry->bo, __entry->pages) | 27 | TP_printk("bo=%p, pages=%u", __entry->bo, __entry->pages) |
28 | ); | 28 | ); |
29 | 29 | ||
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 | |||
30 | DECLARE_EVENT_CLASS(radeon_fence_request, | 50 | DECLARE_EVENT_CLASS(radeon_fence_request, |
31 | 51 | ||
32 | TP_PROTO(struct drm_device *dev, u32 seqno), | 52 | TP_PROTO(struct drm_device *dev, u32 seqno), |