summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2015-11-03 13:05:25 +0000
committerJohn Harrison <John.C.Harrison@Intel.com>2016-06-28 17:19:27 +0100
commit0f8349ebb341b051b59170f0e1d010bfb4eb70fa (patch)
treee77084564a4534969c4b089dff5b21824ca49748
parentcfebd7f70d100ba7283c8318a9f8832f3827e60b (diff)
drm/i915: Added preemption info to various trace points
v2: Fixed a typo (and improved the names in general). Updated for changes to notify() code. For: VIZ-2021 Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c6
-rw-r--r--drivers/gpu/drm/i915/i915_scheduler.c2
-rw-r--r--drivers/gpu/drm/i915/i915_trace.h30
3 files changed, 24 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 909808fc2c74..e940a63d5549 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2957,7 +2957,7 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked)
u32 seqno;
if (list_empty(&engine->fence_signal_list)) {
- trace_i915_gem_request_notify(engine, 0);
+ trace_i915_gem_request_notify(engine, 0, 0, 0);
return;
}
@@ -2969,7 +2969,7 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked)
* It can never lead to not processing work that does need to happen.
*/
seqno = engine->get_seqno(engine, false);
- trace_i915_gem_request_notify(engine, seqno);
+ trace_i915_gem_request_notify(engine, seqno, 0, 0);
/* Is there anything new to process? */
if ((seqno == engine->last_irq_seqno) &&
@@ -3026,6 +3026,8 @@ void i915_gem_request_notify(struct intel_engine_cs *engine, bool fence_locked)
I915_PREEMPTIVE_ACTIVE_SEQNO);
preempt_done = intel_read_status_page(engine,
I915_PREEMPTIVE_DONE_SEQNO);
+ trace_i915_gem_request_notify(engine, seqno, preempt_start,
+ preempt_done);
/*
* A preemption request leaves both ACTIVE and DONE set to the
diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
index 808e3fdc62ff..5a463852adc0 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.c
+++ b/drivers/gpu/drm/i915/i915_scheduler.c
@@ -1124,7 +1124,7 @@ bool i915_scheduler_notify_request(struct drm_i915_gem_request *req,
unsigned long flags;
bool result;
- trace_i915_scheduler_landing(req);
+ trace_i915_scheduler_landing(req, preempt);
spin_lock_irqsave(&scheduler->lock, flags);
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 2edaaf659841..4af4fc3f0e26 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -561,13 +561,16 @@ DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
);
TRACE_EVENT(i915_gem_request_notify,
- TP_PROTO(struct intel_engine_cs *engine, uint32_t seqno),
- TP_ARGS(engine, seqno),
+ TP_PROTO(struct intel_engine_cs *engine, uint32_t seqno,
+ uint32_t preempt_start, uint32_t preempt_done),
+ TP_ARGS(engine, seqno, preempt_start, preempt_done),
TP_STRUCT__entry(
__field(u32, dev)
__field(u32, ring)
__field(u32, seqno)
+ __field(u32, preempt_start)
+ __field(u32, preempt_done)
__field(bool, is_empty)
),
@@ -575,12 +578,15 @@ TRACE_EVENT(i915_gem_request_notify,
__entry->dev = engine->dev->primary->index;
__entry->ring = engine->id;
__entry->seqno = seqno;
+ __entry->preempt_start = preempt_start;
+ __entry->preempt_done = preempt_done;
__entry->is_empty =
list_empty(&engine->fence_signal_list);
),
- TP_printk("dev=%u, ring=%u, seqno=%u, empty=%d",
+ TP_printk("dev=%u, ring=%u, seqno=%u, preempt_start=%u, preempt_done=%u, empty=%d",
__entry->dev, __entry->ring, __entry->seqno,
+ __entry->preempt_start, __entry->preempt_done,
__entry->is_empty)
);
@@ -880,27 +886,29 @@ TRACE_EVENT(i915_scheduler_unfly,
);
TRACE_EVENT(i915_scheduler_landing,
- TP_PROTO(struct drm_i915_gem_request *req),
- TP_ARGS(req),
+ TP_PROTO(struct drm_i915_gem_request *req, bool preempt),
+ TP_ARGS(req, preempt),
TP_STRUCT__entry(
__field(u32, engine)
__field(u32, uniq)
__field(u32, seqno)
__field(u32, status)
+ __field(bool, preempt)
),
TP_fast_assign(
- __entry->engine = req->engine->id;
- __entry->uniq = req->uniq;
- __entry->seqno = req->seqno;
- __entry->status = req->scheduler_qe ?
+ __entry->engine = req->engine->id;
+ __entry->uniq = req->uniq;
+ __entry->seqno = req->seqno;
+ __entry->status = req->scheduler_qe ?
req->scheduler_qe->status : ~0U;
+ __entry->preempt = preempt;
),
- TP_printk("engine=%d, uniq=%d, seqno=%d, status=%d",
+ TP_printk("engine=%d, uniq=%d, seqno=%d, status=%d, preempt=%d",
__entry->engine, __entry->uniq, __entry->seqno,
- __entry->status)
+ __entry->status, __entry->preempt)
);
TRACE_EVENT(i915_scheduler_remove,