public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/i915: trace vm eviction instead of everything
@ 2013-09-14 22:03 Ben Widawsky
  2013-09-14 22:03 ` [PATCH 2/6] drm/i915: Provide a cheap ggtt vma lookup Ben Widawsky
                   ` (4 more replies)
  0 siblings, 5 replies; 57+ messages in thread
From: Ben Widawsky @ 2013-09-14 22:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ben Widawsky, Ben Widawsky

Tracing vm eviction is really the event we care about. For the cases we
evict everything, we still will get the trace.

v2: Add the drm device to the trace since we might not be the only
device in the system. (Chris)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_gem_evict.c |  2 ++
 drivers/gpu/drm/i915/i915_trace.h     | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
index 3a3981e..b737653 100644
--- a/drivers/gpu/drm/i915/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
@@ -175,6 +175,8 @@ int i915_gem_evict_vm(struct i915_address_space *vm, bool do_idle)
 	struct i915_vma *vma, *next;
 	int ret;
 
+	trace_i915_gem_evict_vm(vm);
+
 	if (do_idle) {
 		ret = i915_gpu_idle(vm->dev);
 		if (ret)
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index e2c5ee6..403309b 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -233,6 +233,21 @@ TRACE_EVENT(i915_gem_evict_everything,
 	    TP_printk("dev=%d", __entry->dev)
 );
 
+TRACE_EVENT(i915_gem_evict_vm,
+	    TP_PROTO(struct i915_address_space *vm),
+	    TP_ARGS(vm),
+
+	    TP_STRUCT__entry(
+			     __field(struct i915_address_space *, vm)
+			    ),
+
+	    TP_fast_assign(
+			   __entry->vm = vm;
+			  ),
+
+	    TP_printk("dev=%d, vm=%p", __entry->vm->dev->primary->index, __entry->vm)
+);
+
 TRACE_EVENT(i915_gem_ring_dispatch,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno, u32 flags),
 	    TP_ARGS(ring, seqno, flags),
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 57+ messages in thread
* [PATCH 1/6] drm/i915: trace vm eviction instead of everything
@ 2013-09-24 16:57 Ben Widawsky
  2013-09-24 19:14 ` Daniel Vetter
  0 siblings, 1 reply; 57+ messages in thread
From: Ben Widawsky @ 2013-09-24 16:57 UTC (permalink / raw)
  To: Intel GFX; +Cc: Ben Widawsky, Ben Widawsky

Tracing vm eviction is really the event we care about. For the cases we
evict everything, we still will get the trace.

v2: Add the drm device to the trace since we might not be the only
device in the system. (Chris)

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_gem_evict.c |  2 ++
 drivers/gpu/drm/i915/i915_trace.h     | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
index 3a3981e..b737653 100644
--- a/drivers/gpu/drm/i915/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
@@ -175,6 +175,8 @@ int i915_gem_evict_vm(struct i915_address_space *vm, bool do_idle)
 	struct i915_vma *vma, *next;
 	int ret;
 
+	trace_i915_gem_evict_vm(vm);
+
 	if (do_idle) {
 		ret = i915_gpu_idle(vm->dev);
 		if (ret)
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index e2c5ee6..403309b 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -233,6 +233,21 @@ TRACE_EVENT(i915_gem_evict_everything,
 	    TP_printk("dev=%d", __entry->dev)
 );
 
+TRACE_EVENT(i915_gem_evict_vm,
+	    TP_PROTO(struct i915_address_space *vm),
+	    TP_ARGS(vm),
+
+	    TP_STRUCT__entry(
+			     __field(struct i915_address_space *, vm)
+			    ),
+
+	    TP_fast_assign(
+			   __entry->vm = vm;
+			  ),
+
+	    TP_printk("dev=%d, vm=%p", __entry->vm->dev->primary->index, __entry->vm)
+);
+
 TRACE_EVENT(i915_gem_ring_dispatch,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno, u32 flags),
 	    TP_ARGS(ring, seqno, flags),
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2013-09-24 19:14 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-14 22:03 [PATCH 1/6] drm/i915: trace vm eviction instead of everything Ben Widawsky
2013-09-14 22:03 ` [PATCH 2/6] drm/i915: Provide a cheap ggtt vma lookup Ben Widawsky
2013-09-14 22:03 ` [PATCH 3/6] drm/i915: Convert active API to VMA Ben Widawsky
2013-09-14 22:03 ` [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM Ben Widawsky
2013-09-16  9:25   ` Chris Wilson
2013-09-16 18:23     ` Ben Widawsky
2013-09-16 22:05       ` Daniel Vetter
2013-09-16 22:18         ` Chris Wilson
2013-09-16 22:20           ` Daniel Vetter
2013-09-16 22:13       ` Chris Wilson
2013-09-17  5:44         ` Ben Widawsky
2013-09-17  7:49           ` Chris Wilson
2013-09-17 17:00             ` [PATCH 4/6] [v5] " Ben Widawsky
2013-09-14 22:03 ` [PATCH 5/6] drm/i915: Use the new vm [un]bind functions Ben Widawsky
2013-09-16  7:37   ` Chris Wilson
2013-09-16 18:31     ` Ben Widawsky
2013-09-17 17:01     ` [PATCH 5/6] [v3] " Ben Widawsky
2013-09-17 20:55       ` Chris Wilson
2013-09-17 23:14         ` Ben Widawsky
2013-09-17 23:33           ` Chris Wilson
2013-09-17 23:48             ` Ben Widawsky
2013-09-17 23:57               ` Chris Wilson
2013-09-18  0:02                 ` Ben Widawsky
2013-09-18  8:30                   ` Chris Wilson
2013-09-18 14:47                     ` Ben Widawsky
2013-09-18 14:53                       ` Chris Wilson
2013-09-18 15:48                         ` Ben Widawsky
2013-09-18 15:59                           ` Chris Wilson
2013-09-18 16:11                             ` Ben Widawsky
2013-09-18 16:15                               ` Chris Wilson
2013-09-18 16:20                                 ` Daniel Vetter
2013-09-18 16:37                                   ` Ben Widawsky
2013-09-19  0:12                                 ` [PATCH] [v4] " Ben Widawsky
2013-09-19  9:13                                   ` Chris Wilson
2013-09-19 14:15                                     ` [PATCH] [v5] " Ben Widawsky
2013-09-19 14:26                                       ` Chris Wilson
2013-09-19 14:41                                         ` [PATCH] [v6] " Ben Widawsky
2013-09-19 14:45                                           ` [PATCH] [v7] " Ben Widawsky
2013-09-20  4:06                                             ` [PATCH] " Ben Widawsky
2013-09-20 10:43                                               ` Chris Wilson
2013-09-20 13:24                                                 ` Daniel Vetter
2013-09-20 13:26                                                   ` Daniel Vetter
2013-09-20 13:29                                                   ` Chris Wilson
2013-09-20 20:44                                                 ` Ben Widawsky
2013-09-20 20:55                                                   ` Chris Wilson
2013-09-20 21:08                                                     ` Ben Widawsky
2013-09-20 21:22                                                     ` Daniel Vetter
2013-09-22 18:46                                                 ` [PATCH] [v9] " Ben Widawsky
2013-09-23  8:39                                                   ` Chris Wilson
2013-09-23 22:00                                                     ` Ben Widawsky
2013-09-23 22:10                                                       ` Chris Wilson
2013-09-19 14:47                                           ` [PATCH] [v6] " Chris Wilson
2013-09-19 17:41                                             ` Ben Widawsky
2013-09-19 18:36                                               ` Daniel Vetter
2013-09-14 22:03 ` [PATCH 6/6] drm/i915: eliminate vm->insert_entries() Ben Widawsky
  -- strict thread matches above, loose matches on Subject: below --
2013-09-24 16:57 [PATCH 1/6] drm/i915: trace vm eviction instead of everything Ben Widawsky
2013-09-24 19:14 ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox