drm/amdgpu: add amdgpu_bo_list_set trace point
authorChristian König <christian.koenig@amd.com>
Wed, 10 Jun 2015 12:45:21 +0000 (14:45 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Jun 2015 15:21:43 +0000 (11:21 -0400)
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <aleander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h

index 36d34e0afbc3a5cacb51d590af6506c62a7d58ee..f82a2dd83874dea20c7e7b2a6ddf8aee74e0fe1d 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <drm/drmP.h>
 #include "amdgpu.h"
+#include "amdgpu_trace.h"
 
 static int amdgpu_bo_list_create(struct amdgpu_fpriv *fpriv,
                                 struct amdgpu_bo_list **result,
@@ -124,6 +125,8 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
                        gws_obj = entry->robj;
                if (entry->prefered_domains == AMDGPU_GEM_DOMAIN_OA)
                        oa_obj = entry->robj;
+
+               trace_amdgpu_bo_list_set(list, entry->robj);
        }
 
        for (i = 0; i < list->num_entries; ++i)
index 9fe4f3ccd3199a972b3b2fe998fc565b9fb8bc0b..ed20f44b924dc05283b8a04176fc812cac8d81c6 100644 (file)
@@ -169,6 +169,21 @@ TRACE_EVENT(amdgpu_vm_flush,
                      __entry->pd_addr, __entry->ring, __entry->id)
 );
 
+TRACE_EVENT(amdgpu_bo_list_set,
+           TP_PROTO(struct amdgpu_bo_list *list, struct amdgpu_bo *bo),
+           TP_ARGS(list, bo),
+           TP_STRUCT__entry(
+                            __field(struct amdgpu_bo_list *, list)
+                            __field(struct amdgpu_bo *, bo)
+                            ),
+
+           TP_fast_assign(
+                          __entry->list = list;
+                          __entry->bo = bo;
+                          ),
+           TP_printk("list=%p, bo=%p", __entry->list, __entry->bo)
+);
+
 DECLARE_EVENT_CLASS(amdgpu_fence_request,
 
            TP_PROTO(struct drm_device *dev, int ring, u32 seqno),