From: John.C.Harrison@Intel.com
To: Intel-GFX@Lists.FreeDesktop.Org
Subject: [PATCH v10 5/6] drm/i915: Updated request structure tracing
Date: Thu, 16 Jun 2016 13:54:39 +0100 [thread overview]
Message-ID: <1466081680-2344-6-git-send-email-John.C.Harrison@Intel.com> (raw)
In-Reply-To: <1466081680-2344-1-git-send-email-John.C.Harrison@Intel.com>
From: John Harrison <John.C.Harrison@Intel.com>
Added the '_complete' trace event which occurs when a fence/request is
signaled as complete. Also moved the notify event from the IRQ handler
code to inside the notify function itself.
v3: Added the current ring seqno to the notify trace point.
v5: Line wrapping to keep the style checker happy.
v7: Updated to newer nightly (lots of ring -> engine renaming).
v10: Dropped the 'is_empty' flag from trace_i915_gem_request_notify()
as it is now redundant - 'seqno == 0' is equivalent.
[Review comments from Tvrtko Ursulin]
For: VIZ-5190
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 9 +++++++--
drivers/gpu/drm/i915/i915_irq.c | 1 -
drivers/gpu/drm/i915/i915_trace.h | 6 +++---
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a2c761b..d7b88b1 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2967,8 +2967,10 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked,
* not-empty. And a false not-empty is not an issue - it would just be
* the same as not doing the early exit test at all.
*/
- if (list_empty(&engine->fence_signal_list))
+ if (list_empty(&engine->fence_signal_list)) {
+ trace_i915_gem_request_notify(engine, 0);
return;
+ }
if (!fence_locked)
spin_lock_irq(&engine->fence_lock);
@@ -2976,6 +2978,7 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked,
if (!lazy_coherency && engine->irq_seqno_barrier)
engine->irq_seqno_barrier(engine);
seqno = engine->get_seqno(engine);
+ trace_i915_gem_request_notify(engine, seqno);
list_for_each_entry_safe(req, req_next, &engine->fence_signal_list, signal_link) {
if (!req->cancelled && !i915_seqno_passed(seqno, req->seqno))
@@ -2987,8 +2990,10 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked,
*/
list_del_init(&req->signal_link);
- if (!req->cancelled)
+ if (!req->cancelled) {
fence_signal_locked(&req->fence);
+ trace_i915_gem_request_complete(req);
+ }
if (req->irq_enabled) {
req->engine->irq_put(req->engine);
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index c5024e7..57b4ac8 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -979,7 +979,6 @@ static void notify_ring(struct intel_engine_cs *engine)
if (!intel_engine_initialized(engine))
return;
- trace_i915_gem_request_notify(engine);
engine->user_interrupts++;
queue_work(engine->i915->req_wq, &engine->request_work);
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 6768db0..ef4c573 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -546,8 +546,8 @@ DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
);
TRACE_EVENT(i915_gem_request_notify,
- TP_PROTO(struct intel_engine_cs *engine),
- TP_ARGS(engine),
+ TP_PROTO(struct intel_engine_cs *engine, uint32_t seqno),
+ TP_ARGS(engine, seqno),
TP_STRUCT__entry(
__field(u32, dev)
@@ -558,7 +558,7 @@ TRACE_EVENT(i915_gem_request_notify,
TP_fast_assign(
__entry->dev = engine->i915->dev->primary->index;
__entry->ring = engine->id;
- __entry->seqno = engine->get_seqno(engine);
+ __entry->seqno = seqno;
),
TP_printk("dev=%u, ring=%u, seqno=%u",
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-06-16 12:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 12:54 [PATCH v10 0/6] Convert requests to use struct fence John.C.Harrison
2016-06-16 12:54 ` [PATCH v10 1/6] drm/i915: Add per context timelines for fence objects John.C.Harrison
2016-06-21 12:47 ` Maarten Lankhorst
2016-06-16 12:54 ` [PATCH v10 2/6] drm/i915: Convert requests to use struct fence John.C.Harrison
2016-06-21 12:58 ` Maarten Lankhorst
2016-06-16 12:54 ` [PATCH v10 3/6] drm/i915: Removed now redundant parameter to i915_gem_request_completed() John.C.Harrison
2016-06-16 12:54 ` [PATCH v10 4/6] drm/i915: Interrupt driven fences John.C.Harrison
2016-06-17 11:05 ` [PATCH v10b " John.C.Harrison
2016-06-21 10:44 ` Tvrtko Ursulin
2016-06-21 16:27 ` Tvrtko Ursulin
2016-06-27 18:28 ` John Harrison
2016-06-30 13:52 ` John.C.Harrison
2016-06-16 12:54 ` John.C.Harrison [this message]
2016-06-17 11:06 ` [PATCH v10b 5/6] drm/i915: Updated request structure tracing John.C.Harrison
2016-06-16 12:54 ` [PATCH v10 6/6] drm/i915: Cache last IRQ seqno to reduce IRQ overhead John.C.Harrison
2016-06-21 12:29 ` Maarten Lankhorst
2016-06-16 13:15 ` ✗ Ro.CI.BAT: failure for Convert requests to use struct fence (rev7) Patchwork
2016-06-17 11:10 ` John Harrison
2016-06-23 8:53 ` ✗ Ro.CI.BAT: failure for Convert requests to use struct fence (rev9) Patchwork
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=1466081680-2344-6-git-send-email-John.C.Harrison@Intel.com \
--to=john.c.harrison@intel.com \
--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