From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 4/8] drm/i915: trace vm eviction instead of everything
Date: Wed, 11 Sep 2013 14:57:51 -0700 [thread overview]
Message-ID: <1378936675-27587-4-git-send-email-benjamin.widawsky@intel.com> (raw)
In-Reply-To: <1378936675-27587-1-git-send-email-benjamin.widawsky@intel.com>
Tracing vm eviction is really the event we care about. For the cases we
evict everything, we still will get the trace.
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 a3e279d..b46f7b9 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..c1a24af 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("vm=%p", __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
next prev parent reply other threads:[~2013-09-11 21:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 21:57 [PATCH 1/8] drm/i915: Synchronize pread/pwrite with wait_rendering Ben Widawsky
2013-09-11 21:57 ` [PATCH 2/8] drm/i915: Extract vm specific part of eviction Ben Widawsky
2013-09-11 21:57 ` [PATCH 3/8] drm/i915: evict VM instead of everything Ben Widawsky
2013-09-11 22:45 ` Daniel Vetter
2013-09-11 21:57 ` Ben Widawsky [this message]
2013-09-11 22:02 ` [PATCH 4/8] drm/i915: trace vm eviction " Chris Wilson
2013-09-11 21:57 ` [PATCH 5/8] drm/i915: Convert active API to VMA Ben Widawsky
2013-09-11 22:14 ` Chris Wilson
2013-09-11 21:57 ` [PATCH 6/8] drm/i915: Add bind/unbind object functions to VM Ben Widawsky
2013-09-11 22:25 ` Chris Wilson
2013-09-11 22:49 ` Daniel Vetter
2013-09-11 21:57 ` [PATCH 7/8] drm/i915: Use the new vm [un]bind functions Ben Widawsky
2013-09-11 22:39 ` Chris Wilson
2013-09-14 1:08 ` Ben Widawsky
2013-09-14 15:31 ` Chris Wilson
2013-09-11 21:57 ` [PATCH 8/8] drm/i915: eliminate vm->insert_entries() Ben Widawsky
-- strict thread matches above, loose matches on Subject: below --
2013-08-30 23:43 [PATCH 0/8] [RESEND] VMA patches Ben Widawsky
2013-08-30 23:43 ` [PATCH 4/8] drm/i915: trace vm eviction instead of everything Ben Widawsky
2013-08-31 0:06 ` Chris Wilson
2013-08-31 3:40 ` Ben Widawsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378936675-27587-4-git-send-email-benjamin.widawsky@intel.com \
--to=benjamin.widawsky@intel.com \
--cc=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox