drm/radeon: add VMID allocation trace point
authorChristian König <christian.koenig@amd.com>
Mon, 25 Nov 2013 14:42:10 +0000 (15:42 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Dec 2013 21:40:43 +0000 (16:40 -0500)
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_gart.c
drivers/gpu/drm/radeon/radeon_trace.h

index 3044e504f4ec9a8a4cbf6ef18bbd009fe7672c01..aa8f7782d295d05649ab79cac54c7bea0c412fee 100644 (file)
@@ -29,6 +29,7 @@
 #include <drm/radeon_drm.h>
 #include "radeon.h"
 #include "radeon_reg.h"
+#include "radeon_trace.h"
 
 /*
  * GART
@@ -737,6 +738,7 @@ struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev,
        for (i = 0; i < 2; ++i) {
                if (choices[i]) {
                        vm->id = choices[i];
+                       trace_radeon_vm_grab_id(vm->id, ring);
                        return rdev->vm_manager.active[choices[i]];
                }
        }
index 9f0e18172b6e8074bf865e93902d67f1584141bd..8c13aeca59c9e108b6d08963765204eeffc33d3d 100644 (file)
@@ -47,6 +47,21 @@ TRACE_EVENT(radeon_cs,
                      __entry->fences)
 );
 
+TRACE_EVENT(radeon_vm_grab_id,
+           TP_PROTO(unsigned vmid, int ring),
+           TP_ARGS(vmid, ring),
+           TP_STRUCT__entry(
+                            __field(u32, vmid)
+                            __field(u32, ring)
+                            ),
+
+           TP_fast_assign(
+                          __entry->vmid = vmid;
+                          __entry->ring = ring;
+                          ),
+           TP_printk("vmid=%u, ring=%u", __entry->vmid, __entry->ring)
+);
+
 TRACE_EVENT(radeon_vm_set_page,
            TP_PROTO(uint64_t pe, uint64_t addr, unsigned count,
                     uint32_t incr, uint32_t flags),